diff options
author | skaluzka <skaluzka@protonmail.com> | 2021-08-22 20:36:36 +0200 |
---|---|---|
committer | skaluzka <skaluzka@protonmail.com> | 2021-08-22 20:36:36 +0200 |
commit | bbbeed942f10b8076d56d3fc6c700b14e4e957d3 (patch) | |
tree | cfe7ec8ae85281f7130c609eee5db7a8597a9786 /scripts/maint | |
parent | 984e3a9c6c4d193e095c376637321c0bfa371c08 (diff) | |
download | tor-bbbeed942f10b8076d56d3fc6c700b14e4e957d3.tar.gz tor-bbbeed942f10b8076d56d3fc6c700b14e4e957d3.zip |
Correct syntax & formatting in test_pratracker.sh
Use 4 spaces for indentations.
Use the same syntax for all functions.
No real code changes (except removal of unnecessary ";" from
"exit 1" command).
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/practracker/test_practracker.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/maint/practracker/test_practracker.sh b/scripts/maint/practracker/test_practracker.sh index e29b9106de..bb734ad9cd 100755 --- a/scripts/maint/practracker/test_practracker.sh +++ b/scripts/maint/practracker/test_practracker.sh @@ -1,15 +1,15 @@ #!/bin/sh -# Fail if any subprocess fails unexpectedly +# Fail this script if any subprocess fails unexpectedly. set -e umask 077 unset TOR_DISABLE_PRACTRACKER TMPDIR="" -clean () { +clean() { if [ -n "$TMPDIR" ] && [ -d "$TMPDIR" ]; then - rm -rf "$TMPDIR" + rm -rf "$TMPDIR" fi } trap clean EXIT HUP INT TERM @@ -27,7 +27,7 @@ PRACTRACKER_DIR="scripts/maint/practracker" TMPDIR="$(mktemp -d -t pracktracker.test.XXXXXX)" if test -z "${TMPDIR}" || test ! -d "${TMPDIR}" ; then echo >&2 "mktemp failed." - exit 1; + exit 1 fi DATA="${PRACTRACKER_DIR}/testdata" @@ -43,6 +43,7 @@ run_practracker() { --terse \ "${DATA}/" "$@" || echo "practracker exit status: $?" } + compare() { # we can't use cmp because we need to use -b for windows diff -b -u "$@" > "${TMPDIR}/test-diff" || true |