[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix issues that shellcheck found in chutney-git-bisect.sh



commit 8b5ad246e81a8346b79d37052320753f87e22a04
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Thu Oct 11 20:28:11 2018 +0300

    Fix issues that shellcheck found in chutney-git-bisect.sh
---
 changes/ticket28006                | 3 +++
 scripts/test/chutney-git-bisect.sh | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/changes/ticket28006 b/changes/ticket28006
new file mode 100644
index 000000000..95a4b2cae
--- /dev/null
+++ b/changes/ticket28006
@@ -0,0 +1,3 @@
+  o Code simplification and refactoring:
+    - Fix issues that shellcheck found in chutney-git-bisect.sh.
+      Resolves ticket 28006.
diff --git a/scripts/test/chutney-git-bisect.sh b/scripts/test/chutney-git-bisect.sh
index 8a3f2c70c..dc1319a27 100755
--- a/scripts/test/chutney-git-bisect.sh
+++ b/scripts/test/chutney-git-bisect.sh
@@ -20,7 +20,7 @@ if [ ! -z "$1" ]; then
 fi
 
 if [ ! -z "$2" ]; then
-    cd "$2"
+    cd "$2" || exit
 fi
 
 CHUTNEY_TEST_CMD="make test-network-all"
@@ -54,9 +54,9 @@ while [ "$i" -le "$CHUTNEY_TRIES" ]; do
         echo "test '$CHUTNEY_TEST_CMD' succeeded after $i/$CHUTNEY_TRIES attempts, good"
         exit 0
     fi
-    i=$[$i+1]
+    i=$((i+1))
 done
 
-i=$[$i-1]
+i=$((i-1))
 echo "test '$CHUTNEY_TEST_CMD' failed $i/$CHUTNEY_TRIES attempts, bad"
 exit 1



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits