diff --git a/makenemo b/makenemo index 7b20c3c317ac14527aec246aadba534f22db12de..8f429bd2db3ce33385783bcae5658d7ff39d89a1 100755 --- a/makenemo +++ b/makenemo @@ -223,11 +223,23 @@ done if [ -n "$x_name" ] # is the configuration existing in cfgs or tests? or is it a new conf? then - incfg=$( find $CFGS_DIR -type d -name $x_name | wc -l ) # this configuration exists in CFGS_DIR + incfg=$( find $CFGS_DIR -type d -name $x_name | wc -l ) # this configuration exists in CFGS_DIR intst=$( find $TESTS_DIR -type d -name $x_name | wc -l ) # this configuration exists in TESTS_DIR - [[ $incfg -eq 0 && $intst -eq 0 ]] && x_n=$x_name # this is a new configuration -> dedine/overwrite x_n - [[ $incfg -eq 1 && -z "$x_r" ]] && x_r=$x_name # this is a reference configuration -> dedine/overwrite x_r - [[ $intst -eq 1 && -z "$x_a" ]] && x_a=$x_name # this is a test configuration -> dedine/overwrite x_a + if [ $(( $incfg + $intst )) -eq 2 ] ; then + echo -e "\033[0;31m\nERROR: the $x_name directory is found twice: in $CFGS_DIR and in $TESTS_DIR\033[0m\n" + exit 4 + fi + if [ $(( $incfg + $intst )) -gt 0 ] ; then + [ -n "$x_r" ] && echo -e "\nWARNING: $x_name configuration is already existing, we ignore \"-r $x_r\"\n" + [ -n "$x_a" ] && echo -e "\nWARNING: $x_name configuration is already existing, we ignore \"-a $x_a\"\n" + fi + if [ $incfg -eq 1 ] ; then + x_r=$x_name ; x_a='' # reference configuration existing -> define/overwrite x_r + elif [ $intst -eq 1 ] ; then + x_a=$x_name ; x_r='' # test configuration existing -> define/overwrite x_a + else + x_n=$x_name # this is a new configuration -> define + fi fi export NEW_CONF=${x_n} diff --git a/sette/sette.sh b/sette/sette.sh index 9c3e0a3a22c78cd518790c2a9bdae517f6b6f421..7537af5e849258a035b630a4dd8d78f7b3f0a852 100755 --- a/sette/sette.sh +++ b/sette/sette.sh @@ -166,7 +166,7 @@ if [ $# -gt 0 ]; then echo ' for SETTE-built configurations (needed if sette.sh invocations may overlap)' echo '-r to execute without waiting to run sette_rpt.sh at the end (useful for chaining sette.sh invocations)' echo '-y to perform a dryrun to simply report what settings will be used' - echo '-d to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)' + echo '-b to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)' echo '-c to clean each configuration' echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF' echo '-u to run sette.sh without any user interaction. This means no checks on creating'