[GRASS-SVN] r30440 - grass/trunk/scripts/v.db.dropcol

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 3 06:52:56 EST 2008


Author: msieczka
Date: 2008-03-03 06:52:55 -0500 (Mon, 03 Mar 2008)
New Revision: 30440

Modified:
   grass/trunk/scripts/v.db.dropcol/v.db.dropcol
Log:
Remove whitespace. More standarization.

Modified: grass/trunk/scripts/v.db.dropcol/v.db.dropcol
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcol	2008-03-03 11:41:49 UTC (rev 30439)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcol	2008-03-03 11:52:55 UTC (rev 30440)
@@ -3,7 +3,7 @@
 ############################################################################
 #
 # MODULE:       v.db.dropcolumn
-# AUTHOR(S):   	Markus Neteler
+# AUTHOR(S):    Markus Neteler
 # PURPOSE:      interface to db.execute to drop a column from the 
 #               attribute table connected to a given vector map
 #               - Based on v.db.addcol
@@ -97,7 +97,7 @@
    exit 1
 fi
 
-table=`v.db.connect $GIS_OPT_MAP -g | grep -w $GIS_OPT_LAYER | cut -f2 -d" "`
+table=`v.db.connect map=$GIS_OPT_MAP -g | grep -w $GIS_OPT_LAYER | cut -f2 -d" "`
 if [ -z "$table" ] ; then
    g.message -e 'There is no table connected to the input vector map! Cannot delete any column.'
    cleanup
@@ -115,7 +115,7 @@
    exit 1
 fi
 
-v.info --q -c $GIS_OPT_MAP layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep "|${col}$" 2>&1 >/dev/null
+v.info --q -c map=$GIS_OPT_MAP layer=$GIS_OPT_LAYER | cut -d'|' -f1,2 | grep "|${col}$" 2>&1 >/dev/null
 if [ $? -ne 0 ] ; then
 	g.message -e "Column <$col> not found in table <$table>."
 	cleanup
@@ -125,7 +125,7 @@
 if [ "$driver" = "sqlite" ] ; then
 	#echo "Using special trick for SQLite"
 	# http://www.sqlite.org/faq.html#q13
-	v.info --q -c $table | cut -d'|' -f1,2 | grep -v "|${col}$" > $TMP.coldesc
+	v.info --q -c map=$table | cut -d'|' -f1,2 | grep -v "|${col}$" > $TMP.coldesc
 	# need to revert order:
 	cat $TMP.coldesc | cut -d'|' -f1 > $TMP.coltypes
 	cat $TMP.coldesc | cut -d'|' -f2 > $TMP.colnames
@@ -158,6 +158,6 @@
 cleanup
 
 # write cmd history:
-v.support ${GIS_OPT_MAP} cmdhist="${CMDLINE}"
+v.support map=${GIS_OPT_MAP} cmdhist="${CMDLINE}"
 
 exit 0



More information about the grass-commit mailing list