[GRASS-SVN] r55198 - in grass/branches/develbranch_6/scripts: r.pack r.unpack

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 25 12:02:28 PST 2013


Author: hamish
Date: 2013-02-25 12:02:28 -0800 (Mon, 25 Feb 2013)
New Revision: 55198

Modified:
   grass/branches/develbranch_6/scripts/r.pack/r.pack
   grass/branches/develbranch_6/scripts/r.unpack/r.unpack
Log:
better handle spaces in GISDBASE (#1683)

Modified: grass/branches/develbranch_6/scripts/r.pack/r.pack
===================================================================
--- grass/branches/develbranch_6/scripts/r.pack/r.pack	2013-02-25 19:32:09 UTC (rev 55197)
+++ grass/branches/develbranch_6/scripts/r.pack/r.pack	2013-02-25 20:02:28 UTC (rev 55198)
@@ -109,7 +109,8 @@
 
 # copy projection info
 #   (would prefer to use g.proj*, but this way is 5.3 and 5.7 compat)
-eval `g.gisenv`
+LOCATION_NAME=`g.gisenv get=LOCATION_NAME`
+GISDBASE=`g.gisenv get=GISDBASE`
 
 for SUPPORT in INFO UNITS EPSG ; do
    if [ -e "$GISDBASE/$LOCATION_NAME/PERMANENT/PROJ_$SUPPORT" ] ; then

Modified: grass/branches/develbranch_6/scripts/r.unpack/r.unpack
===================================================================
--- grass/branches/develbranch_6/scripts/r.unpack/r.unpack	2013-02-25 19:32:09 UTC (rev 55197)
+++ grass/branches/develbranch_6/scripts/r.unpack/r.unpack	2013-02-25 20:02:28 UTC (rev 55198)
@@ -62,7 +62,9 @@
    exit 1
 fi
 
-eval `g.gisenv`
+MAPSET=`g.gisenv get=MAPSET`
+LOCATION_NAME=`g.gisenv get=LOCATION_NAME`
+GISDBASE=`g.gisenv get=GISDBASE`
 MSET_DIR="$GISDBASE/$LOCATION_NAME/$MAPSET"
 
 # create temporary directory to hold bits
@@ -71,8 +73,10 @@
    g.message -e "Unable to create temporary files"
    exit 1
 fi
+
 rm -f "$TMP_DIR"
 mkdir "$TMP_DIR"
+
 if [ ! -d "$TMP_DIR" ] ; then
    g.message -e "Unable to create temporary directory"
    exit 1



More information about the grass-commit mailing list