diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-10-04 11:34:46 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-10-04 11:34:46 +0200 |
commit | 3fdf88f612719f062e5a19969f22204075941128 (patch) | |
tree | a6db5ecf9f1654878d0a51420878d95f489fd27c | |
parent | 3ec07d62c35f0e74ed53cb0712ccb446fe656728 (diff) |
-fix some vars
-rwxr-xr-x | src/auditor/test-auditor.sh | 4 | ||||
-rwxr-xr-x | src/auditor/test-revocation.sh | 2 | ||||
-rwxr-xr-x | src/auditor/test-sync.sh | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index c9895b6f..859b9944 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -102,7 +102,7 @@ function cleanup() function exit_cleanup() { echo "Running exit-cleanup" - if test ! -z ${POSTGRES_PATH:-} + if ! [[ -z ${POSTGRES_PATH:-} ]] then echo "Stopping Postgres at ${POSTGRES_PATH}" ${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null stop &> /dev/null || true @@ -2050,7 +2050,7 @@ INITDB_BIN=$(command -v initdb) || true if [[ ! -z $INITDB_BIN ]]; then echo " FOUND (in path) at" $INITDB_BIN else - HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` || exit_skip " MISSING" + HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres | head -1` || exit_skip " MISSING" echo " FOUND at" `dirname $HAVE_INITDB` INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n | tail -n1` fi diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh index e21b9487..c25f15e8 100755 --- a/src/auditor/test-revocation.sh +++ b/src/auditor/test-revocation.sh @@ -96,7 +96,7 @@ function cleanup() function exit_cleanup() { echo "Running exit-cleanup" - if test ! -z ${POSTGRES_PATH:-} + if [[ ! -z ${POSTGRES_PATH:-} ]] then echo "Stopping Postgres at ${POSTGRES_PATH}" ${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null stop &> /dev/null || true diff --git a/src/auditor/test-sync.sh b/src/auditor/test-sync.sh index 174e03c6..10a2e3f7 100755 --- a/src/auditor/test-sync.sh +++ b/src/auditor/test-sync.sh @@ -32,7 +32,7 @@ function exit_fail() { # Cleanup to run whenever we exit function cleanup() { - if test ! -z ${POSTGRES_PATH:-} + if ! [[ -z ${POSTGRES_PATH:-} ]] then ${POSTGRES_PATH}/pg_ctl -D $TMPDIR stop &> /dev/null || true fi |