This commit is contained in:
edoapra 2023-03-16 13:20:05 -07:00
parent 7c17f90163
commit e64a264100
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0

View file

@ -1,8 +1,11 @@
#/usr/bin/env bash
# ifeq ($(shell basename -- $(FC)| cut -d \- -f 1),nvfortran)
if [[ -z $_FC ]]; then
echo $(basename -- $1 | cut -d \- -f 1 | sed 's/[0-9]*//g')
else
#gcc or gfortran?
if [[ "$1" == *fortran* ]] && [[ ! -z $_FC ]]; then
echo $_FC
elif [[ "$1" == *cc* ]] && [[ ! -z $_CC ]]; then
echo $_CC
else
echo $(basename -- $1 | cut -d \- -f 1 | sed 's/[0-9]*//g')
fi