From f33257fce7c7646bd9f8d7b2537979a8a1f6ce32 Mon Sep 17 00:00:00 2001 From: Michael Tryby Date: Tue, 5 Mar 2019 16:48:35 -0500 Subject: [PATCH] Trouble shooting error handling --- tools/before-test.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/before-test.sh b/tools/before-test.sh index d5586f2..c7d152e 100755 --- a/tools/before-test.sh +++ b/tools/before-test.sh @@ -77,15 +77,14 @@ cd ${TEST_HOME} # retrieve epanet-examples for regression testing -curl -fsSL -o examples.tar.gz ${TEST_URL} -if ["$?" != "0"]; THEN - echo "ERROR: curl failed ${TEST_URL}" +if ! curl -fsSL -o examples.tar.gz ${TEST_URL}; then + echo "ERROR: curl - ${TEST_URL}" +fi # retrieve epanet benchmark results -curl -fsSL -o benchmark.tar.gz ${BENCH_URL} -if ["$?" != "0"]; THEN - echo "ERROR: curl failed ${BENCH_URL}" - +if ! curl -fsSL -o benchmark.tar.gz ${BENCH_URL}; then + echo "ERROR: curl - ${BENCH_URL}" +fi # extract tests, benchmarks, and manifest tar xzf examples.tar.gz