From f14c43a7a4773ff078e4b635dfaf9d8328ad11e1 Mon Sep 17 00:00:00 2001 From: Eric Fayolle Date: Fri, 7 Oct 2022 11:09:30 +0200 Subject: [PATCH] Fiabilisation du script ib_test.sh --- ReacteurNumerique/ib_test.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ReacteurNumerique/ib_test.sh b/ReacteurNumerique/ib_test.sh index 5208c087..be2f3429 100755 --- a/ReacteurNumerique/ib_test.sh +++ b/ReacteurNumerique/ib_test.sh @@ -4,7 +4,7 @@ myabort() { echo $* >&2 ; exit 1;} case "$1" in ?*.comm) - echo "Lancement..." + echo "Launching execution..." for i in ./{*.csv,*.med}; do rm -f "$i" ; done # activate du banc repose sur module qui est paramétré sous scibian pour bash @@ -13,12 +13,14 @@ case "$1" in ib-run -- $PWD/$1 $PWD/_ibworkdir if test $? != 0; then + deactivate myabort "A problem occurs while executing ib-run -- ${PWD}/${1} ${PWD}/_ibworkdir"; else - echo "Execution réussie"; + echo -e "\nSuccessful execution."; + for i in $PWD/_ibworkdir/{*.csv,*.med}; do ln -sf "$i" "`basename "$i"`"; done + deactivate fi - for i in $PWD/_ibworkdir/{*.csv,*.med}; do ln -sf "$i" "`basename "$i"`"; done - deactivate + echo -e "\nSuccessful ending..." ;; *) echo "Usage: $0 .comm" >&2 -- 2.39.2