[GRASS-SVN] r30481 - grass/trunk/scripts/d.vect.thematic

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 5 23:45:22 EST 2008


Author: hamish
Date: 2008-03-05 23:45:22 -0500 (Wed, 05 Mar 2008)
New Revision: 30481

Modified:
   grass/trunk/scripts/d.vect.thematic/d.vect.thematic
Log:
remove non-portable 'echo -n'

Modified: grass/trunk/scripts/d.vect.thematic/d.vect.thematic
===================================================================
--- grass/trunk/scripts/d.vect.thematic/d.vect.thematic	2008-03-06 04:42:11 UTC (rev 30480)
+++ grass/trunk/scripts/d.vect.thematic/d.vect.thematic	2008-03-06 04:45:22 UTC (rev 30481)
@@ -240,7 +240,7 @@
 MAX_LEG_ITEMS=18
 
 # check column type
-COLTYPE="`v.info -c $GIS_OPT_MAP layer=$GIS_OPT_LAYER 2> /dev/null | grep -w $GIS_OPT_COLUMN | cut -d'|' -f1 | tr -s '[:upper:]' '[:lower:]'`"
+COLTYPE=`v.info -c "$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" 2> /dev/null | grep -w "$GIS_OPT_COLUMN" | cut -d'|' -f1 | tr -s '[:upper:]' '[:lower:]'`
 
 #COLTYPE=... 
 if [ -z "$COLTYPE" ] ; then 
@@ -248,11 +248,9 @@
    exit 1 
 fi 
 
-if [ "$COLTYPE" = "integer" -o "$COLTYPE" = "double precision" ] ; then
-	echo -n ""
-else
-	g.message -e message="Column <$GIS_OPT_COLUMN> is of type <$COLTYPE> which is not numeric."
-	exit 1
+if [ "$COLTYPE" != "integer" ] && [ "$COLTYPE" != "double precision" ] ; then
+   g.message -e message="Column <$GIS_OPT_COLUMN> is of type <$COLTYPE> which is not numeric."
+   exit 1
 fi
 
 # create temporary file to hold output from v.univar



More information about the grass-commit mailing list