[GRASS-SVN] r40292 - grass/branches/releasebranch_6_4/scripts/v.db.addtable

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 6 15:06:42 EST 2010


Author: hamish
Date: 2010-01-06 15:06:41 -0500 (Wed, 06 Jan 2010)
New Revision: 40292

Modified:
   grass/branches/releasebranch_6_4/scripts/v.db.addtable/v.db.addtable
Log:
parse C:\ path correctly (merge from devbr6)

Modified: grass/branches/releasebranch_6_4/scripts/v.db.addtable/v.db.addtable
===================================================================
--- grass/branches/releasebranch_6_4/scripts/v.db.addtable/v.db.addtable	2010-01-06 17:50:50 UTC (rev 40291)
+++ grass/branches/releasebranch_6_4/scripts/v.db.addtable/v.db.addtable	2010-01-06 20:06:41 UTC (rev 40292)
@@ -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