[GRASS-SVN] r55225 - grass/branches/develbranch_6/scripts/v.in.geonames

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 25 15:44:29 PST 2013


Author: hamish
Date: 2013-02-25 15:44:29 -0800 (Mon, 25 Feb 2013)
New Revision: 55225

Modified:
   grass/branches/develbranch_6/scripts/v.in.geonames/v.in.geonames
Log:
better handle spaces in GISDBASE (#1683), remove unused variables

Modified: grass/branches/develbranch_6/scripts/v.in.geonames/v.in.geonames
===================================================================
--- grass/branches/develbranch_6/scripts/v.in.geonames/v.in.geonames	2013-02-25 23:40:16 UTC (rev 55224)
+++ grass/branches/develbranch_6/scripts/v.in.geonames/v.in.geonames	2013-02-25 23:44:29 UTC (rev 55225)
@@ -57,8 +57,6 @@
     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/gawk first"
@@ -70,11 +68,7 @@
 LC_NUMERIC=C
 export LC_NUMERIC
 
-eval `g.gisenv`
-: ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
-LOCATION="$GISDBASE"/"$LOCATION_NAME"/"$MAPSET"
 
-
 if [ -n "$GIS_OPT_INPUT" ] ; then
     FILEORIG="$GIS_OPT_INPUT"
     if [ -n "$GIS_OPT_VECT" ] ; then
@@ -97,8 +91,8 @@
 #are we in LatLong location?
 g.proj -p | grep -i name | grep -i Lon  > /dev/null
 if [ $? -eq 1 ] ; then
-  g.message -e "This module only operates in LatLong/WGS84 locations"
-  exit 1
+    g.message -e "This module only operates in LatLong/WGS84 locations"
+    exit 1
 fi
 
 # input test
@@ -110,7 +104,7 @@
 # DBF doesn't support lengthy text fields
 driver=`db.connect -p | grep -i driver | cut -d':' -f2`
 if [ "$driver" = "dbf" ] ; then
-   g.message -w "Since DBF driver is used, the content of the 'alternatenames' column might be cut with respect to the original Geonames.org column content"
+    g.message -w "Since the DBF driver is used, the content of the 'alternatenames' column might be cut with respect to the original Geonames.org column content"
 fi
 
 



More information about the grass-commit mailing list