aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_rebind.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_rebind.sh')
-rwxr-xr-xsrc/test/test_rebind.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/test_rebind.sh b/src/test/test_rebind.sh
index ea2012957e..e0d8394d38 100755
--- a/src/test/test_rebind.sh
+++ b/src/test/test_rebind.sh
@@ -7,7 +7,7 @@ if test "$UNAME_OS" = 'CYGWIN' || \
test "$UNAME_OS" = 'MSYS' || \
test "$UNAME_OS" = 'MINGW'; then
if test "$APPVEYOR" = 'True'; then
- echo "This test is disabled on Windows CI, as it requires firewall examptions. Skipping." >&2
+ echo "This test is disabled on Windows CI, as it requires firewall exemptions. Skipping." >&2
exit 77
fi
fi
@@ -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