aboutsummaryrefslogtreecommitdiff
path: root/src/test/test-network.sh
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2019-02-02 16:46:30 +0200
committerrl1987 <rl1987@sdf.lonestar.org>2019-02-02 16:46:30 +0200
commitf888b3e2ee23f6e0394c9c7589c10e320714deda (patch)
treeb361642b736550eccd263648b3a67a215e712a22 /src/test/test-network.sh
parent7341d9acdc4699498a593d0ff848be5e7d7fe0c5 (diff)
downloadtor-f888b3e2ee23f6e0394c9c7589c10e320714deda.tar.gz
tor-f888b3e2ee23f6e0394c9c7589c10e320714deda.zip
Update test-network.sh to bash script to use array
This lets us to save original script argument to array (POSIX shell does not support that). Fixes shellcheck warnings SC2124 and SC2086.
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-xsrc/test/test-network.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 51b298ca84..e382eec66e 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# This script calls the equivalent script in chutney/tools
@@ -20,7 +20,7 @@ myname=$(basename $0)
# Save the arguments before we destroy them
# This might not preserve arguments with spaces in them
-ORIGINAL_ARGS="$@"
+ORIGINAL_ARGS=( "$@" )
# We need to find CHUTNEY_PATH, so that we can call the version of this script
# in chutney/tools with the same arguments. We also need to respect --quiet.
@@ -99,7 +99,7 @@ if [ -d "$CHUTNEY_PATH" ] && [ -x "$TEST_NETWORK" ]; then
# this may fail if some arguments have spaces in them
# if so, set CHUTNEY_PATH before calling test-network.sh, and spaces
# will be handled correctly
- exec "$TEST_NETWORK" $ORIGINAL_ARGS
+ exec "$TEST_NETWORK" "${ORIGINAL_ARGS[@]}" # $ORIGINAL_ARGS
else
$ECHO "$myname: Could not find tools/test-network.sh in CHUTNEY_PATH."
$ECHO "$myname: Please update your chutney using 'git pull'."