[GRASS-SVN] r55215 - grass/branches/develbranch_6/scripts/db.in.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 25 15:03:07 PST 2013
Author: hamish
Date: 2013-02-25 15:03:07 -0800 (Mon, 25 Feb 2013)
New Revision: 55215
Modified:
grass/branches/develbranch_6/scripts/db.in.ogr/db.in.ogr
Log:
better handle spaces in GISDBASE (#1683), remove unused variables
Modified: grass/branches/develbranch_6/scripts/db.in.ogr/db.in.ogr
===================================================================
--- grass/branches/develbranch_6/scripts/db.in.ogr/db.in.ogr 2013-02-25 22:59:29 UTC (rev 55214)
+++ grass/branches/develbranch_6/scripts/db.in.ogr/db.in.ogr 2013-02-25 23:03:07 UTC (rev 55215)
@@ -59,7 +59,6 @@
exec g.parser "$0" "$@"
fi
-PROG=`basename "$0"`
# setting environment, so that awk works properly in all languages
unset LC_ALL
@@ -77,8 +76,7 @@
trap "exitprocedure" 2 3 15
### setup enviro vars ###
-eval `g.gisenv`
-: ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
+MAPSET=`g.gisenv get=MAPSET`
# check if we want to connect to real DB
if [ ! -z "$GIS_OPT_DB_TABLE" ] ; then
@@ -95,7 +93,7 @@
if [ -z "$GRASS_OVERWRITE" ] ; then
if [ `db.tables -p | grep "^${GIS_OPT_OUTPUT}$"` ] ; then
- g.message -e "Table <${GIS_OPT_OUTPUT}> already exists"
+ g.message -e "Table <$GIS_OPT_OUTPUT> already exists"
exit 1
fi
else
@@ -110,7 +108,7 @@
# check ERRORs and cat and cat_ issues (maybe problem with translated messages)
# we import faking a map which generates only the attribute table:
-### check-me: is the quoting ok?
+### CHECK-ME: is the quoting ok?
WARNING="`v.in.ogr --q dsn=\"$GIS_OPT_DSN\" $LAYER out=$GIS_OPT_OUTPUT -o --o 2>&1 | grep -i 'ERROR\|cat' | grep -v 'truncated'`"
if [ -n "$WARNING" ] ; then
echo "$WARNING"
More information about the grass-commit
mailing list