From: Bruce Momjian Date: Mon, 11 Feb 2002 15:19:33 +0000 (+0000) Subject: Fix flag handling of pg_upgrade. X-Git-Tag: REL7_2_1~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=966e6478b595ccf49be1627f7be26a39cecf5a66;p=postgresql Fix flag handling of pg_upgrade. --- diff --git a/contrib/pg_upgrade/pg_upgrade b/contrib/pg_upgrade/pg_upgrade index 7fdc3d2b67..13bf340fde 100755 --- a/contrib/pg_upgrade/pg_upgrade +++ b/contrib/pg_upgrade/pg_upgrade @@ -3,7 +3,7 @@ # pg_upgrade: update a database without needing a full dump/reload cycle. # CAUTION: Read the manual page before trying to use this! -# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.11 2002/01/31 19:13:53 momjian Exp $ +# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.12 2002/02/11 15:19:33 momjian Exp $ # # To migrate this to newer versions of PostgreSQL: # 1) Update the version numbers at the top of the file @@ -34,8 +34,8 @@ trap "rm -f /tmp/$$.*" 0 1 2 3 15 BASENAME=`basename "$0"` PHASE="" -if [ "$#" -eq 1 ] -then +while [ "$#" -ne 0 ] +do if [ "X$1" = "X-1" ] then PHASE="1" shift @@ -46,7 +46,7 @@ then then PGDATA="$2" shift 2 fi -fi +done if [ "$PHASE" = "" ] then echo "You must run $BASENAME in either mode 1 or mode 2." 1>&2