From 1206a84c2c22c86c6c3c08f9dad09ae0c5d59632 Mon Sep 17 00:00:00 2001 From: Bborie Park Date: Fri, 23 Dec 2011 16:22:34 +0000 Subject: [PATCH] Fixed for better path handling git-svn-id: http://svn.osgeo.org/postgis/trunk@8529 b70326c6-7e19-0410-871a-916f4a2858ee --- utils/uninstall_script | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/uninstall_script b/utils/uninstall_script index 8b44f814d..8a2d5332f 100755 --- a/utils/uninstall_script +++ b/utils/uninstall_script @@ -1,12 +1,5 @@ #!/bin/bash - # this script assumes that it is located in utils -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -# use utils as our working directory -cd $DIR DB=postgis_uninstall @@ -32,9 +25,16 @@ cleanup () { # get reference uninstall of postgis.sql only if [ "$1" == "raster" ]; then - ${DIR}$0 + $0 fi +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +# use utils as our working directory +cd $DIR + # create database createdb $DB @@ -75,7 +75,7 @@ if [ "raster" == "$1" ]; then OIFS=$IFS IFS=$'\n' - echo -n '' > $OUTFILE + echo -n '' > ${RTPATH}$OUTFILE # see if line found in uninstall_postgis.sql for x in `cat $OUTFILE.$RAND`; do -- 2.49.0