diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2019-02-07 17:22:06 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2019-02-07 17:23:23 +0200 |
commit | 8df6a65e6b86be70ab1d7f57b097913068ace72c (patch) | |
tree | eae2851fa2d057d76b5ee8490732b6896ec005f9 /src/test/zero_length_keys.sh | |
parent | bfd1d702433fde0c551a1c79d410d87fe22feb30 (diff) | |
download | tor-8df6a65e6b86be70ab1d7f57b097913068ace72c.tar.gz tor-8df6a65e6b86be70ab1d7f57b097913068ace72c.zip |
Fix shellcheck warning in zero_length_keys.sh
Diffstat (limited to 'src/test/zero_length_keys.sh')
-rwxr-xr-x | src/test/zero_length_keys.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/zero_length_keys.sh b/src/test/zero_length_keys.sh index 3c61f8d465..4069148e0b 100755 --- a/src/test/zero_length_keys.sh +++ b/src/test/zero_length_keys.sh @@ -19,7 +19,7 @@ # 3: a command failed - the test could not be completed # -if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then +if [ $# -eq 0 ] || [ ! -f "${1}" ] || [ ! -x "${1}" ]; then echo "Usage: ${0} PATH_TO_TOR [-z|-d|-e]" exit 1 elif [ $# -eq 1 ]; then @@ -31,7 +31,7 @@ else #[$# -gt 1 ]; then shift fi -DATA_DIR=`mktemp -d -t tor_zero_length_keys.XXXXXX` +DATA_DIR=$(mktemp -d -t tor_zero_length_keys.XXXXXX) if [ -z "$DATA_DIR" ]; then echo "Failure: mktemp invocation returned empty string" >&2 exit 3 @@ -40,7 +40,7 @@ if [ ! -d "$DATA_DIR" ]; then echo "Failure: mktemp invocation result doesn't point to directory" >&2 exit 3 fi -trap "rm -rf '$DATA_DIR'" 0 +trap 'rm -rf "$DATA_DIR"' 0 touch "$DATA_DIR"/empty_torrc |