mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
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).
This commit is contained in:
parent
984e3a9c6c
commit
bbbeed942f
@ -1,13 +1,13 @@
|
||||
#!/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"
|
||||
fi
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user