[GRASS-SVN] r55203 - grass/branches/develbranch_6/scripts/v.db.update

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 25 13:18:32 PST 2013


Author: hamish
Date: 2013-02-25 13:18:31 -0800 (Mon, 25 Feb 2013)
New Revision: 55203

Modified:
   grass/branches/develbranch_6/scripts/v.db.update/v.db.update
Log:
better handle spaces in GISDBASE (#1683), rm some unused vars

Modified: grass/branches/develbranch_6/scripts/v.db.update/v.db.update
===================================================================
--- grass/branches/develbranch_6/scripts/v.db.update/v.db.update	2013-02-25 21:09:51 UTC (rev 55202)
+++ grass/branches/develbranch_6/scripts/v.db.update/v.db.update	2013-02-25 21:18:31 UTC (rev 55203)
@@ -75,25 +75,16 @@
     exec g.parser "$0" "$@"
 fi
 
-PROG=`basename "$0"`
-
-#### check if we have awk
-if [ ! -x "`which awk`" ] ; then
-    g.message -e "awk required, please install awk or gawk first"
-    exit 1
-fi
-
 # setting environment, so that awk works properly in all languages
 unset LC_ALL
 LC_NUMERIC=C
 export LC_NUMERIC
 
 ### setup enviro vars ###
-eval `g.gisenv`
-: ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
+MAPSET=`g.gisenv get=MAPSET`
 
 # does map exist in CURRENT mapset?
-eval `g.findfile element=vector file=$GIS_OPT_MAP mapset=$MAPSET`
+eval `g.findfile element=vector file="$GIS_OPT_MAP" mapset="$MAPSET"`
 if [ ! "$file" ] ; then
    g.message -e "Vector map '$GIS_OPT_MAP' not found in current mapset"
    exit 1



More information about the grass-commit mailing list