commit d6df03566a138d6934abedf94bdff4c08d64f83b Author: teor teor@torproject.org Date: Mon Apr 8 12:01:26 2019 +1000
shellcheck: fix warnings in the bootstrap-network.sh script
Part of 30065. --- tools/bootstrap-network.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/bootstrap-network.sh b/tools/bootstrap-network.sh index bea8cee..9117291 100755 --- a/tools/bootstrap-network.sh +++ b/tools/bootstrap-network.sh @@ -14,12 +14,13 @@ #
# Get a working chutney path -if [ ! -d "$CHUTNEY_PATH" -o ! -x "$CHUTNEY_PATH/chutney" ]; then +if [ ! -d "$CHUTNEY_PATH" ] || [ ! -x "$CHUTNEY_PATH/chutney" ]; then # looks like a broken path: use the path to this tool instead - TOOLS_PATH=`dirname "$0"` - export CHUTNEY_PATH=`dirname "$TOOLS_PATH"` + TOOLS_PATH=$(dirname "$0") + CHUTNEY_PATH=$(dirname "$TOOLS_PATH") + export CHUTNEY_PATH fi -if [ -d "$PWD/$CHUTNEY_PATH" -a -x "$PWD/$CHUTNEY_PATH/chutney" ]; then +if [ -d "$PWD/$CHUTNEY_PATH" ] && [ -x "$PWD/$CHUTNEY_PATH/chutney" ]; then # looks like a relative path: make chutney path absolute export CHUTNEY_PATH="$PWD/$CHUTNEY_PATH" fi
tor-commits@lists.torproject.org