|
3 | 3 | # pg_upgrade: update a database without needing a full dump/reload cycle. |
4 | 4 | # CAUTION: Read the manual page before trying to use this! |
5 | 5 |
|
6 | | -# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.11 2002/01/3119:13:53 momjian Exp $ |
| 6 | +# $Header: /cvsroot/pgsql/contrib/pg_upgrade/Attic/pg_upgrade,v 1.12 2002/02/11 15:19:33 momjian Exp $ |
7 | 7 | # |
8 | 8 | # To migrate this to newer versions of PostgreSQL: |
9 | 9 | #1) Update the version numbers at the top of the file |
@@ -34,8 +34,8 @@ trap "rm -f /tmp/$$.*" 0 1 2 3 15 |
34 | 34 | BASENAME=`basename"$0"` |
35 | 35 | PHASE="" |
36 | 36 |
|
37 | | -if ["$#"-eq 1 ] |
38 | | -then |
| 37 | +while ["$#"-ne 0 ] |
| 38 | +do |
39 | 39 | if ["X$1"="X-1" ] |
40 | 40 | thenPHASE="1" |
41 | 41 | shift |
|
46 | 46 | thenPGDATA="$2" |
47 | 47 | shift 2 |
48 | 48 | fi |
49 | | -fi |
| 49 | +done |
50 | 50 |
|
51 | 51 | if ["$PHASE"="" ] |
52 | 52 | thenecho"You must run$BASENAME in either mode 1 or mode 2."1>&2 |
|