[GRASS-SVN] r40287 - grass/branches/develbranch_6/scripts/v.db.addtable

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 6 09:09:43 EST 2010


Author: hamish
Date: 2010-01-06 09:09:43 -0500 (Wed, 06 Jan 2010)
New Revision: 40287

Modified:
   grass/branches/develbranch_6/scripts/v.db.addtable/v.db.addtable
Log:
parse C:\ path correctly

Modified: grass/branches/develbranch_6/scripts/v.db.addtable/v.db.addtable
===================================================================
--- grass/branches/develbranch_6/scripts/v.db.addtable/v.db.addtable	2010-01-06 14:08:56 UTC (rev 40286)
+++ grass/branches/develbranch_6/scripts/v.db.addtable/v.db.addtable	2010-01-06 14:09:43 UTC (rev 40287)
@@ -121,14 +121,14 @@
 if [ $? -ne 0 ] ; then
    # nothing defined for layer 1
    g.message "Creating new DB connection based on default mapset settings..."
-   database=`db.connect -p | grep '^database' | cut -d':' -f2`
+   database=`db.connect -p | grep '^database' | cut -d':' -f2-`
    driver=`db.connect -p | grep '^driver' | cut -d':' -f2`
 else
    # there is a definition for layer 1, so we check for the user defined layer
    database=`v.db.connect map="$GIS_OPT_MAP" -g fs=";" | grep -w "$QUERYLAYER" | awk -F ";" '{print $4}'`
    if [ -z "$database" ] ; then
       #nothing on user defined layer, so we use the default mapset settings in this case:
-      database=`db.connect -p | grep '^database' | cut -d':' -f2`
+      database=`db.connect -p | grep '^database' | cut -d':' -f2-`
       driver=`db.connect -p | grep '^driver' | cut -d':' -f2`
    else
       driver=`v.db.connect map="$GIS_OPT_MAP" -g fs=";" | grep -w "$QUERYLAYER" | awk -F ";" '{print $5}'`



More information about the grass-commit mailing list