Commit 686f362b authored by Noah Misch's avatar Noah Misch

Fix contrib/pg_upgrade/test.sh for $PWD containing spaces.

Most of the necessary quoting was in place; this catches the exceptions.
parent c82725ed
...@@ -80,7 +80,7 @@ if [ "$1" = '--install' ]; then ...@@ -80,7 +80,7 @@ if [ "$1" = '--install' ]; then
# use psql from the proper installation directory, which might # use psql from the proper installation directory, which might
# be outdated or missing. But don't override anything else that's # be outdated or missing. But don't override anything else that's
# already in EXTRA_REGRESS_OPTS. # already in EXTRA_REGRESS_OPTS.
EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --psqldir=$bindir" EXTRA_REGRESS_OPTS="$EXTRA_REGRESS_OPTS --psqldir='$bindir'"
export EXTRA_REGRESS_OPTS export EXTRA_REGRESS_OPTS
fi fi
...@@ -117,7 +117,7 @@ PGCONNECT_TIMEOUT=""; unset PGCONNECT_TIMEOUT ...@@ -117,7 +117,7 @@ PGCONNECT_TIMEOUT=""; unset PGCONNECT_TIMEOUT
PGHOSTADDR=""; unset PGHOSTADDR PGHOSTADDR=""; unset PGHOSTADDR
# Select a non-conflicting port number, similarly to pg_regress.c # Select a non-conflicting port number, similarly to pg_regress.c
PG_VERSION_NUM=`grep '#define PG_VERSION_NUM' $newsrc/src/include/pg_config.h | awk '{print $3}'` PG_VERSION_NUM=`grep '#define PG_VERSION_NUM' "$newsrc"/src/include/pg_config.h | awk '{print $3}'`
PGPORT=`expr $PG_VERSION_NUM % 16384 + 49152` PGPORT=`expr $PG_VERSION_NUM % 16384 + 49152`
export PGPORT export PGPORT
...@@ -141,8 +141,8 @@ export EXTRA_REGRESS_OPTS ...@@ -141,8 +141,8 @@ export EXTRA_REGRESS_OPTS
# enable echo so the user can see what is being executed # enable echo so the user can see what is being executed
set -x set -x
$oldbindir/initdb -N "$oldbindir"/initdb -N
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w "$oldbindir"/pg_ctl start -l "$logdir/postmaster1.log" -o "$POSTMASTER_OPTS" -w
if "$MAKE" -C "$oldsrc" installcheck; then if "$MAKE" -C "$oldsrc" installcheck; then
pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$? pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
if [ "$newsrc" != "$oldsrc" ]; then if [ "$newsrc" != "$oldsrc" ]; then
...@@ -167,7 +167,7 @@ if "$MAKE" -C "$oldsrc" installcheck; then ...@@ -167,7 +167,7 @@ if "$MAKE" -C "$oldsrc" installcheck; then
else else
make_installcheck_status=$? make_installcheck_status=$?
fi fi
$oldbindir/pg_ctl -m fast stop "$oldbindir"/pg_ctl -m fast stop
if [ -n "$make_installcheck_status" ]; then if [ -n "$make_installcheck_status" ]; then
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment