this bug's URL: http://intevation.de/rt/webrt?serial_num=4924
-------------------------------------------------------------------------
Subject: missing quoted path vars in init.sh
Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.1 CVS
A few path variables are not quoted in Init.sh (mainly GISBASE). If GRASS is installed in a location
with spaces in the path (very possible with OS X), the path to GRASS gets messed up and GRASS won't
run.
This diff I think takes care of everything (I hope the posting doesn't mess it up):
--- init.sh.orig 2006-07-28 23:20:06.000000000 -0500
+++ init.sh 2006-07-29 12:42:10.000000000 -0500
@@ -146,7 +146,7 @@
export GRASS_GUI
# Set PATH to GRASS bin, ETC to GRASS etc
-ETC=$GISBASE/etc
+ETC="$GISBASE/etc"
if [ "$LC_ALL" ] ; then
LCL=`echo "$LC_ALL" | sed 's/\(..\)\(.*\)/\1/'`
@@ -165,13 +165,13 @@
# Set LD_LIBRARY_PATH to find GRASS shared libraries
if [ ! "$LD_LIBRARY_PATH_VAR" ] ; then
- LD_LIBRARY_PATH_VAR=$GISBASE/lib
+ LD_LIBRARY_PATH_VAR="$GISBASE/lib"
else
- LD_LIBRARY_PATH_VAR=$GISBASE/lib:$LD_LIBRARY_PATH_VAR
+ LD_LIBRARY_PATH_VAR="$GISBASE/lib:$LD_LIBRARY_PATH_VAR"
fi
export LD_LIBRARY_PATH_VAR
# Additional copy of variable to use with grass-run.sh
-GRASS_LD_LIBRARY_PATH=$LD_LIBRARY_PATH_VAR
+GRASS_LD_LIBRARY_PATH="$LD_LIBRARY_PATH_VAR"
export GRASS_LD_LIBRARY_PATH
# Once the new environment system is committed we can delete these lines
@@ -576,7 +576,7 @@
LOCATION_NAME=`g.gisenv LOCATION_NAME`
MAPSET=`g.gisenv MAPSET`
-LOCATION=${GISDBASE?}/${LOCATION_NAME?}/${MAPSET?}
+LOCATION="${GISDBASE?}/${LOCATION_NAME?}/${MAPSET?}"
# Check for concurrent use
lockfile="$LOCATION/.gislock"
-------------------------------------------- Managed by Request Tracker