Fortran bootstrap script for Debian-based distributions

Hello everyone!

While trying to ease the installation process of the needed software to get a working environment at my research group I made a simple bootstrap script that will install the basics for getting ready (it installs gfortran, [optional intel oneAPI], lapack, fpm, fortls, etc).
Assuming a Debian-based distribution which is what most people here use (actually WSL’s Ubuntu), but it would be really nice making this more flexible.

It also includes another script I made (in principle because everyone here is still afraid of the terminal) to centralize some commands in a fortran_project command. All the configurations are made assuming the user will use vscode as an editor. While many users here might find this pretty redundant, maybe it can help introduce students to editing :slightly_smiling_face: . From the README:
fortran_project is a command that eases your projects organization. It has
three fundamental uses:

  • fortran_project new <project_name>

Create a new project.
The default folder will be at ~/codes, but it can be set up with
the environment variable FORTRAN_PROJECTS.
If the directory doesn’t exist, it will be created. It will also add a custom .vscode directory as a submodule, pulling from: GitHub - ipqa-research/vscode-fortran: Configuraciones de Fortran para vscode, permitiendo uso y debuggeo con fpm

  • fortran_project list

List all the existing Fortran projects.

  • fortran_project work

Open vscode on the selected project directory.

  • fortran_project update

Update the fortran_project script

3 Likes