[GRASS-SVN] r57570 - in grass/branches/releasebranch_6_4/scripts: db.in.ogr db.out.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Aug 31 23:28:08 PDT 2013
Author: hamish
Date: 2013-08-31 23:28:08 -0700 (Sat, 31 Aug 2013)
New Revision: 57570
Modified:
grass/branches/releasebranch_6_4/scripts/db.in.ogr/db.in.ogr
grass/branches/releasebranch_6_4/scripts/db.out.ogr/db.out.ogr
Log:
better handle spaces in GISDBASE (#1683), remove unused variables (merge r55215,6 from devbr6)
Modified: grass/branches/releasebranch_6_4/scripts/db.in.ogr/db.in.ogr
===================================================================
--- grass/branches/releasebranch_6_4/scripts/db.in.ogr/db.in.ogr 2013-09-01 06:24:53 UTC (rev 57569)
+++ grass/branches/releasebranch_6_4/scripts/db.in.ogr/db.in.ogr 2013-09-01 06:28:08 UTC (rev 57570)
@@ -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"
Modified: grass/branches/releasebranch_6_4/scripts/db.out.ogr/db.out.ogr
===================================================================
--- grass/branches/releasebranch_6_4/scripts/db.out.ogr/db.out.ogr 2013-09-01 06:24:53 UTC (rev 57569)
+++ grass/branches/releasebranch_6_4/scripts/db.out.ogr/db.out.ogr 2013-09-01 06:28:08 UTC (rev 57570)
@@ -62,7 +62,6 @@
exec g.parser "$0" "$@"
fi
-PROG=`basename "$0"`
# setting environment, so that awk works properly in all languages
unset LC_ALL
@@ -79,9 +78,6 @@
# shell check for user break (signal list: trap -l)
trap "exitprocedure" 2 3 15
-### setup enviro vars ###
-eval `g.gisenv`
-: ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
if [ "$GIS_OPT_FORMAT" = "DBF" -o "$GIS_OPT_FORMAT" = "dbf" ] ; then
GIS_OPT_FORMAT="ESRI_Shapefile"
More information about the grass-commit
mailing list