[GRASS-SVN] r36413 - grass/trunk/scripts/v.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 19 05:17:15 EDT 2009


Author: neteler
Date: 2009-03-19 05:17:15 -0400 (Thu, 19 Mar 2009)
New Revision: 36413

Modified:
   grass/trunk/scripts/v.colors/v.colors
Log:
fix for layer > 1

Modified: grass/trunk/scripts/v.colors/v.colors
===================================================================
--- grass/trunk/scripts/v.colors/v.colors	2009-03-19 09:16:39 UTC (rev 36412)
+++ grass/trunk/scripts/v.colors/v.colors	2009-03-19 09:17:15 UTC (rev 36413)
@@ -209,7 +209,7 @@
 #g.message "column <$GIS_OPT_COLUMN> is type [$NCOLUMN_TYPE]"
 
 # check if GRASSRGB column exists, make it if it doesn't
-TABLE=`v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | cut -f2 -d';'`
+TABLE=`v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER;" | cut -f2 -d';'`
 COLUMN_TYPE=`v.info -c map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" | grep -i "|$GIS_OPT_RGB_COLUMN$" | cut -f1 -d'|'`
 if [ -z "$COLUMN_TYPE" ] ; then
     # RGB Column not found, create it



More information about the grass-commit mailing list