Skip to content
Snippets Groups Projects
Commit bd8345cc authored by Lukas Braun's avatar Lukas Braun
Browse files

test_pg.sh: search for pg_ctl in debian's paths

parent 78c5be83
Branches
Tags
Loading
......@@ -2,6 +2,18 @@
set -eu
# Try to find a Postgres installation (Debian installs PG commands to their own dir)
if ! which pg_ctl >/dev/null 2>/dev/null; then
pg_path=$(echo /usr/lib/postgresql/*/bin | grep -vF '*' | head -1)
if [ -n "$pg_path" ]; then
echo "Using PostgreSQL from $pg_path"
export PATH="$pg_path:$PATH"
else
echo "WARNING: Unable to find pg_ctl, skipping PostgreSQL tests"
exit 0
fi
fi
export PGHOST="$PWD/postgres_test"
if [ $# -ge 1 ]; then
PGHOST="$(realpath -- "$1")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment