diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-25 19:01:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-25 19:01:48 +0000 |
commit | cfc0ba8c049ff4ed9d8dc223b79fb240624f4881 (patch) | |
tree | dd93651500637f1005aa57a8ff8561125b1eb992 | |
parent | c446802b22464e6fc6b594c2fe17504f50c70137 (diff) | |
download | postgresql-cfc0ba8c049ff4ed9d8dc223b79fb240624f4881.tar.gz postgresql-cfc0ba8c049ff4ed9d8dc223b79fb240624f4881.zip |
Another fix for old shells.
-rw-r--r-- | src/bin/initlocation/initlocation.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/initlocation/initlocation.sh b/src/bin/initlocation/initlocation.sh index 277d6cbf2b4..e9ccf43fa98 100644 --- a/src/bin/initlocation/initlocation.sh +++ b/src/bin/initlocation/initlocation.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.5 2000/01/19 20:08:25 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/initlocation/Attic/initlocation.sh,v 1.6 2000/03/25 19:01:48 tgl Exp $ # #------------------------------------------------------------------------- @@ -91,13 +91,15 @@ fi # You can call initlocation $ENVAR, which will of course be resolved # by the shell, or initlocation some/path (containing at least one slash). # Then you just take that path. -# This should apease users who are confused by the above behaviour. +# This should appease users who are confused by the above behaviour. # -if ! echo "$Location" | grep -s '/' >/dev/null 2>&1 && [ ! -d "$Location" ]; then +echo "$Location" | grep '/' >/dev/null 2>&1 + +if [ "$?" -ne 0 -a ! -d "$Location" ]; then PGALTDATA=`printenv $Location 2> /dev/null` if [ -z "$PGALTDATA" ]; then - echo "$CMDNAME: environment variable $PGALTDATA not set" + echo "$CMDNAME: environment variable $Location not set" exit 1 fi haveenv=t |