From 3dec024d7b59a4af83ff35e2237b6f59265af2db Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 17 Nov 2018 19:22:36 +0100 Subject: [PATCH] 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"