[GRASS-SVN] r31594 - grass/branches/develbranch_6/scripts/v.db.join

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 1 04:04:46 EDT 2008


Author: neteler
Date: 2008-06-01 04:04:45 -0400 (Sun, 01 Jun 2008)
New Revision: 31594

Modified:
   grass/branches/develbranch_6/scripts/v.db.join/v.db.join
Log:
reverted

Modified: grass/branches/develbranch_6/scripts/v.db.join/v.db.join
===================================================================
--- grass/branches/develbranch_6/scripts/v.db.join/v.db.join	2008-06-01 07:03:40 UTC (rev 31593)
+++ grass/branches/develbranch_6/scripts/v.db.join/v.db.join	2008-06-01 08:04:45 UTC (rev 31594)
@@ -103,14 +103,10 @@
 
 i=1
 for col in $COLLIST ; do
-  # col already there?
-  v.info --quiet -c map="$GIS_OPT_MAP" layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep "|${col}$" 2>&1 >/dev/null
+  v.db.addcol "$GIS_OPT_MAP" col="$col `echo $COLTYPES | cut -d' ' -f$i | tr -s '_' ' '`"
   if [ $? -ne 0 ] ; then
-     v.db.addcol "$GIS_OPT_MAP" col="$col `echo $COLTYPES | cut -d' ' -f$i | tr -s '_' ' '`"
-     if [ $? -ne 0 ] ; then
 	g.message -e "Cannot continue."
 	exit 1
-     fi
   fi
   echo "UPDATE $maptable SET $col=(SELECT $col
         FROM $GIS_OPT_otable WHERE $GIS_OPT_otable.$GIS_OPT_ocolumn=$maptable.$GIS_OPT_column);" | db.execute



More information about the grass-commit mailing list