diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-02-19 11:56:48 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-02-19 11:56:48 -0500 |
commit | 6927e9a60ca12fa67d6a33044c2903ce95ca1605 (patch) | |
tree | 9a3bd93c6797c90548a864719800971676a04913 | |
parent | 0fc5fdc430968a62a0310fc7022c4562b4625bf2 (diff) | |
parent | 00fff96e4884e295a767532aa570abf8d27e75ee (diff) | |
download | tor-6927e9a60ca12fa67d6a33044c2903ce95ca1605.tar.gz tor-6927e9a60ca12fa67d6a33044c2903ce95ca1605.zip |
Merge remote-tracking branch 'tor-github/pr/665'
-rw-r--r-- | changes/bug29063 | 2 | ||||
-rwxr-xr-x | src/test/test_rebind.sh | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/changes/bug29063 b/changes/bug29063 new file mode 100644 index 0000000000..8cbcbebc6e --- /dev/null +++ b/changes/bug29063 @@ -0,0 +1,2 @@ + o Code simplification and refactoring (shell scripts): + - Fix issues shellcheck found in test_rebind.sh. Resolves issue 29063. diff --git a/src/test/test_rebind.sh b/src/test/test_rebind.sh index 498072de35..a8f07c7c1e 100755 --- a/src/test/test_rebind.sh +++ b/src/test/test_rebind.sh @@ -15,10 +15,15 @@ fi exitcode=0 tmpdir= -clean () { test -n "$tmpdir" && test -d "$tmpdir" && rm -rf "$tmpdir" || :; } +clean () { + if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then + rm -rf "$tmpdir" + fi +} + trap clean EXIT HUP INT TERM -tmpdir="`mktemp -d -t tor_rebind_test.XXXXXX`" +tmpdir="$(mktemp -d -t tor_rebind_test.XXXXXX)" if [ -z "$tmpdir" ]; then echo >&2 mktemp failed exit 2 |