From: Bryan Henderson Date: Sun, 17 Nov 1996 03:55:07 +0000 (+0000) Subject: Fix syntax errors so it runs without error messages. X-Git-Tag: REL2_0~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=620f0146218941d2c258f39f5fe06ebb01facf2e;p=postgresql Fix syntax errors so it runs without error messages. --- diff --git a/src/bin/createdb/createdb.sh b/src/bin/createdb/createdb.sh index 741b34e2ea..4448eee670 100644 --- a/src/bin/createdb/createdb.sh +++ b/src/bin/createdb/createdb.sh @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.5 1996/11/14 10:24:46 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.6 1996/11/17 03:54:44 bryanh Exp $ # #------------------------------------------------------------------------- @@ -42,27 +42,27 @@ do shift; done -if [-z "$AUTHSYS" ]; then - AUTHOPT = "" +if [ -z "$AUTHSYS" ]; then + AUTHOPT="" else - AUTHOPT = "-a $AUTHSYS" + AUTHOPT="-a $AUTHSYS" fi -if [-z "$PGHOST" ]; then - PGHOSTOPT = "" +if [ -z "$PGHOST" ]; then + PGHOSTOPT="" else - PGHOSTOPT = "-h $PGHOST" + PGHOSTOPT="-h $PGHOST" fi -if [-z "$PGPORT" ]; then - PGPORTOPT = "" +if [ -z "$PGPORT" ]; then + PGPORTOPT="" else - PGPORTOPT = "-p $PGPORT" + PGPORTOPT="-p $PGPORT" fi psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "create database $dbname" template1 -if [ $? -ne 0 ] +if [ $? -ne 0 ]; then echo "$CMDNAME: database creation failed on $dbname." exit 1 fi diff --git a/src/bin/createuser/createuser.sh b/src/bin/createuser/createuser.sh index 5789b72b60..a62509fb7d 100644 --- a/src/bin/createuser/createuser.sh +++ b/src/bin/createuser/createuser.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.6 1996/11/14 10:24:54 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.7 1996/11/17 03:54:54 bryanh Exp $ # # Note - this should NOT be setuid. # @@ -39,25 +39,25 @@ do shift; done -if [-z "$AUTHSYS" ]; then - AUTHOPT = "" +if [ -z "$AUTHSYS" ]; then + AUTHOPT="" else - AUTHOPT = "-a $AUTHSYS" + AUTHOPT="-a $AUTHSYS" fi -if [-z "$PGHOST" ]; then - PGHOSTOPT = "" +if [ -z "$PGHOST" ]; then + PGHOSTOPT="" else - PGHOSTOPT = "-h $PGHOST" + PGHOSTOPT="-h $PGHOST" fi -if [-z "$PGPORT" ]; then - PGPORTOPT = "" +if [ -z "$PGPORT" ]; then + PGPORTOPT="" else - PGPORTOPT = "-p $PGPORT" + PGPORTOPT="-p $PGPORT" fi -PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT +PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT" # # generate the first part of the actual monitor command diff --git a/src/bin/destroydb/destroydb.sh b/src/bin/destroydb/destroydb.sh index e0b0e4256e..9f863a964f 100644 --- a/src/bin/destroydb/destroydb.sh +++ b/src/bin/destroydb/destroydb.sh @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.5 1996/11/14 10:25:14 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.6 1996/11/17 03:54:58 bryanh Exp $ # #------------------------------------------------------------------------- @@ -42,22 +42,22 @@ do shift; done -if [-z "$AUTHSYS" ]; then - AUTHOPT = "" +if [ -z "$AUTHSYS" ]; then + AUTHOPT="" else - AUTHOPT = "-a $AUTHSYS" + AUTHOPT="-a $AUTHSYS" fi -if [-z "$PGHOST" ]; then - PGHOSTOPT = "" +if [ -z "$PGHOST" ]; then + PGHOSTOPT="" else - PGHOSTOPT = "-h $PGHOST" + PGHOSTOPT="-h $PGHOST" fi -if [-z "$PGPORT" ]; then - PGPORTOPT = "" +if [ -z "$PGPORT" ]; then + PGPORTOPT="" else - PGPORTOPT = "-p $PGPORT" + PGPORTOPT="-p $PGPORT" fi psql -tq $AUTHOPT $PGHOSTOPT $PGPORTOPT -c "drop database $dbname" template1 diff --git a/src/bin/destroyuser/destroyuser.sh b/src/bin/destroyuser/destroyuser.sh index 41d9509c1f..3fee61559c 100644 --- a/src/bin/destroyuser/destroyuser.sh +++ b/src/bin/destroyuser/destroyuser.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.5 1996/11/14 10:25:19 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.6 1996/11/17 03:55:07 bryanh Exp $ # # Note - this should NOT be setuid. # @@ -39,25 +39,25 @@ do shift; done -if [-z "$AUTHSYS" ]; then - AUTHOPT = "" +if [ -z "$AUTHSYS" ]; then + AUTHOPT="" else - AUTHOPT = "-a $AUTHSYS" + AUTHOPT="-a $AUTHSYS" fi -if [-z "$PGHOST" ]; then - PGHOSTOPT = "" +if [ -z "$PGHOST" ]; then + PGHOSTOPT="" else - PGHOSTOPT = "-h $PGHOST" + PGHOSTOPT="-h $PGHOST" fi -if [-z "$PGPORT" ]; then - PGPORTOPT = "" +if [ -z "$PGPORT" ]; then + PGPORTOPT="" else - PGPORTOPT = "-p $PGPORT" + PGPORTOPT="-p $PGPORT" fi -PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT +PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT" # # generate the first part of the actual monitor command