9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-25 22:12:05 +02:00

fixed error

This commit is contained in:
Yann Damour 2021-11-25 10:28:44 +01:00
parent 7fcd03b911
commit b16edd29e7
4 changed files with 19 additions and 9 deletions

View File

@ -22,15 +22,25 @@ else
echo "Files that will be modified:"
echo $list_files
# Flags that must be added
FLAGS=$(./check_required_setup.sh $COMP)
# Add the flags
for file in $list_files
do
echo $file
ACTUAL=$(grep "IRPF90_FLAGS : --openmp" $file)
FLAGS=$(./check_required_setup.sh $COMP)
BASE="IRPF90_FLAGS : --ninja"
ACTUAL=$(grep "$BASE" $file)
# To have only one time each flag
grep " -DSET_MAX_ACT" $file && ${ACTUAL/" -DSET_MAX"/""}
grep " -DSET_NESTED" $file && ${ACTUAL/" -DSET_NESTED"/""}
SPACE=" "
BASE="IRPF90_FLAGS : --openmp"
NEW=${BASE}${SPACE}${FLAGS}
NEW=${ACTUAL}${SPACE}${FLAGS}
# Debug
#echo ${NEW}
sed "s/${ACTUAL}/${NEW}/" $file
# -i # to change the files