Revert "Walk back from requiring bash"

This reverts commit c346eff223.
This commit is contained in:
rl1987 2019-03-10 18:16:58 +02:00
parent 911f95ed92
commit 4773fa6474

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
# This script calls the equivalent script in chutney/tools # This script calls the equivalent script in chutney/tools
@ -18,6 +18,10 @@ ECHO="${ECHO:-echo}"
# Output is prefixed with the name of the script # Output is prefixed with the name of the script
myname=$(basename "$0") myname=$(basename "$0")
# Save the arguments before we destroy them
# This might not preserve arguments with spaces in them
ORIGINAL_ARGS=( "$@" )
# We need to find CHUTNEY_PATH, so that we can call the version of this script # 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. # in chutney/tools with the same arguments. We also need to respect --quiet.
until [ -z "$1" ] until [ -z "$1" ]
@ -95,7 +99,7 @@ if [ -d "$CHUTNEY_PATH" ] && [ -x "$TEST_NETWORK" ]; then
# this may fail if some arguments have spaces in them # this may fail if some arguments have spaces in them
# if so, set CHUTNEY_PATH before calling test-network.sh, and spaces # if so, set CHUTNEY_PATH before calling test-network.sh, and spaces
# will be handled correctly # will be handled correctly
exec "$TEST_NETWORK" "$@" exec "$TEST_NETWORK" "${ORIGINAL_ARGS[@]}" # $ORIGINAL_ARGS
else else
$ECHO "$myname: Could not find tools/test-network.sh in CHUTNEY_PATH." $ECHO "$myname: Could not find tools/test-network.sh in CHUTNEY_PATH."
$ECHO "$myname: Please update your chutney using 'git pull'." $ECHO "$myname: Please update your chutney using 'git pull'."