From b3904b8da8e077e8e17cf647e07bfa6f155b37b5 Mon Sep 17 00:00:00 2001 From: Greg Szabo Date: Fri, 13 Apr 2018 21:34:05 -0400 Subject: [PATCH] ShellChecked wrapper.sh --- networks/local/localnode/wrapper.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networks/local/localnode/wrapper.sh b/networks/local/localnode/wrapper.sh index 8b55cbc10..e82741e68 100755 --- a/networks/local/localnode/wrapper.sh +++ b/networks/local/localnode/wrapper.sh @@ -11,10 +11,10 @@ LOG=${LOG:-tendermint.log} ## Assert linux binary ## if ! [ -f "${BINARY}" ]; then - echo "The binary `basename ${BINARY}` cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'tendermint' E.g.: -e BINARY=tendermint_my_test_version" + echo "The binary $(basename "${BINARY}") cannot be found. Please add the binary to the shared folder. Please use the BINARY environment variable if the name of the binary is not 'tendermint' E.g.: -e BINARY=tendermint_my_test_version" exit 1 fi -BINARY_CHECK="`file $BINARY | grep 'ELF 64-bit LSB executable, x86-64'`" +BINARY_CHECK="$(file "$BINARY" | grep 'ELF 64-bit LSB executable, x86-64')" if [ -z "${BINARY_CHECK}" ]; then echo "Binary needs to be OS linux, ARCH amd64" exit 1 @@ -26,8 +26,8 @@ fi export TMHOME="/tendermint/node${ID}" if [ -d "${TMHOME}/${LOG}" ]; then - "$BINARY" $@ | tee "${TMHOME}/${LOG}" + "$BINARY" "$@" | tee "${TMHOME}/${LOG}" else - "$BINARY" $@ + "$BINARY" "$@" fi