mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'tor-github/pr/687'
This commit is contained in:
commit
da179088ee
2
changes/ticket29068
Normal file
2
changes/ticket29068
Normal file
@ -0,0 +1,2 @@
|
||||
o Code simplification and refactoring (shell scripts):
|
||||
- Fix shellcheck warnings in zero_length_keys.sh. Resolves issue 29068.
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user