Skip to content
Snippets Groups Projects
Commit 8a77d7a3 authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

Add the possibility to suppress files when preparing source code for a model

parent 09fafa78
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ set -e ...@@ -14,7 +14,7 @@ set -e
#small_3D_alt4: small_3D_alt1 + CSNOWRIMING='OLD' #small_3D_alt4: small_3D_alt1 + CSNOWRIMING='OLD'
#small_3D_alt5: CCLOUD='ICE4' #small_3D_alt5: CCLOUD='ICE4'
#small_3D_alt6: CMF_UPDRAFT='RAHA', CMF_CLOUD='BIGA' #small_3D_alt6: CMF_UPDRAFT='RAHA', CMF_CLOUD='BIGA'
#small_3D_alt7: CMF_UPDRAFT='RHCJ', CMF_CLOUD='STAT', LOSIGMAS=.FALSE. #Needs 2 corrections in original cycle 48 #small_3D_alt7: CMF_CLOUD='STAT', LOSIGMAS=.FALSE. #Needs 2 corrections in original cycle 48
#small_3D_alt8: CMF_UPDRAFT='RHCJ' #small_3D_alt8: CMF_UPDRAFT='RHCJ'
#The small_3D_alt8 is not included in the list of available tests because it needs to be compared against a special commit. #The small_3D_alt8 is not included in the list of available tests because it needs to be compared against a special commit.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#SBATCH -N 1 #SBATCH -N 1
#SBATCH -p normal256 #SBATCH -p normal256
#The MYLIB varibale must contain the gmkpack pack name #The MYLIB variable must contain the gmkpack pack name
#The TESTDIR variable must contain the test directory #The TESTDIR variable must contain the test directory
#Results will be stored in the local directory #Results will be stored in the local directory
......
...@@ -146,7 +146,17 @@ if [ -n "${model-}" ]; then ...@@ -146,7 +146,17 @@ if [ -n "${model-}" ]; then
[ -e src/$model/$sub ] && cp -rlf src/$model/$sub . && rm -rf src/$model/$sub [ -e src/$model/$sub ] && cp -rlf src/$model/$sub . && rm -rf src/$model/$sub
done done
#cleaning #Supression of unwanted files
if [ -f src/$model/filesToSuppress.txt ]; then
#Some files can be present in the common directory but are not wanted for a model export
#because these files are already existing elsewhere in the model source code
while read -r line; do
filename=$(echo $line | sed -e 's/^[[:space:]]*//' | sed -e 's/[[:space:]]*$//') #trim
[ -f "$filename" ] && rm -f "$filename"
done < src/$model/filesToSuppress.txt
fi
#Cleaning
[ $verbose -gt 0 ] && echo "Cleaning unrelevant files" [ $verbose -gt 0 ] && echo "Cleaning unrelevant files"
#multiple checks to prevent error #multiple checks to prevent error
if [ $from == 'git' -a ! $(git config --get remote.origin.url) == "$repository" ]; then if [ $from == 'git' -a ! $(git config --get remote.origin.url) == "$repository" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment