aboutsummaryrefslogtreecommitdiff
path: root/ci/single-file-gfortran.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/single-file-gfortran.sh')
-rwxr-xr-xci/single-file-gfortran.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ci/single-file-gfortran.sh b/ci/single-file-gfortran.sh
new file mode 100755
index 0000000..904c7f8
--- /dev/null
+++ b/ci/single-file-gfortran.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+output="${OUTPUT:-fpm-single-file.F90}"
+
+args=("$@")
+file=$(printf "%s\n" "${args[@]}" | grep -P '^.+\.[fF]90$')
+if [ $? = 0 ]; then
+ echo " + Appending source file '$file' to '${output}'"
+ cat $file >> "${output}"
+fi
+exec gfortran "${args[@]}"