diff options
| author | Bruce Momjian <bruce@momjian.us> | 2001-09-30 22:17:51 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2001-09-30 22:17:51 +0000 |
| commit | c6f94644a0ea716375c1e90cbaa2424588a1a6c7 (patch) | |
| tree | 98e6a7f9491e7373ec712e8861233b65b4ebeecb /src/bin/scripts/createdb | |
| parent | 7eff804b490afbc7815cbaf6d2b4bcec311d12bb (diff) | |
These are further fixes for double quotes missing in the various shell
scripts.
Justin Clift
Diffstat (limited to 'src/bin/scripts/createdb')
| -rw-r--r-- | src/bin/scripts/createdb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/scripts/createdb b/src/bin/scripts/createdb index 8f88586330a..95e8c12d757 100644 --- a/src/bin/scripts/createdb +++ b/src/bin/scripts/createdb @@ -12,7 +12,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.17 2001/09/22 04:28:12 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.18 2001/09/30 22:17:51 momjian Exp $ # #------------------------------------------------------------------------- @@ -26,7 +26,7 @@ dbname= dbcomment= dbpath= -while [ $# -gt 0 ] +while [ "$#" -gt 0 ] do case "$1" in --help|-\?) @@ -154,7 +154,7 @@ if [ -z "$dbname" ]; then else dbname=`${PATHNAME}pg_id -u -n` fi - [ $? -ne 0 ] && exit 1 + [ "$?" -ne 0 ] && exit 1 fi @@ -170,7 +170,7 @@ withstring= [ "$withstring" ] && withstring=" WITH$withstring" ${PATHNAME}psql $PSQLOPT -d template1 -c "CREATE DATABASE \"$dbname\"$withstring" -if [ $? -ne 0 ]; then +if [ "$?" -ne 0 ]; then echo "$CMDNAME: database creation failed" 1>&2 exit 1 fi @@ -181,7 +181,7 @@ fi dbcomment=`echo "$dbcomment" | sed "s/'/\\\\\'/g"` ${PATHNAME}psql $PSQLOPT -d template1 -c "COMMENT ON DATABASE \"$dbname\" IS '$dbcomment'" -if [ $? -ne 0 ]; then +if [ "$?" -ne 0 ]; then echo "$CMDNAME: comment creation failed (database was created)" 1>&2 exit 1 fi |
