From 3dec024d7b59a4af83ff35e2237b6f59265af2db Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 17 Nov 2018 19:22:36 +0100 Subject: [PATCH 1/2] Better process directories --- test_q1.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test_q1.sh b/test_q1.sh index aafde57..f45bb83 100755 --- a/test_q1.sh +++ b/test_q1.sh @@ -47,11 +47,13 @@ echo " Hououuuu ${PWD}" process_args $@ msg "Test $COMMAND script with $TEST_FILE\n\n" +cd $DIR while IFS='' read -r i || [[ -n "$line" ]]; do args=$(echo $i | cut -d: -f1) e_code=$(echo $i | cut -d: -f2) - msg "\nExécution de la command ${COMMAND} avec les paramètres **${args}**\n" - ret=$(${DIR}${COMMAND} $args 2>&1) + msg "\nScript *${COMMAND}*, paramètres **${args}**\n" + ret=$(./$COMMAND $args 2>&1) + if [[ $? == $e_code ]] then msg "green" "\tLe code de retour est celui attendu (${e_code})\n" From 32dd66f0a827c48c9f97e42e6fa42287de16874d Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 17 Nov 2018 19:23:10 +0100 Subject: [PATCH 2/2] Renave test.sh --- test_q1.sh => test.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test_q1.sh => test.sh (100%) diff --git a/test_q1.sh b/test.sh similarity index 100% rename from test_q1.sh rename to test.sh