[GRASS-SVN] r30504 - grass/trunk/scripts/r.in.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 8 23:16:36 EST 2008
Author: hamish
Date: 2008-03-08 23:16:36 -0500 (Sat, 08 Mar 2008)
New Revision: 30504
Modified:
grass/trunk/scripts/r.in.wms/r.in.wms
grass/trunk/scripts/r.in.wms/wms.request
Log:
fix for parsing when all capabilites are on one line; quoting fix for cleaning out downloaded data; done msg when verbose
Modified: grass/trunk/scripts/r.in.wms/r.in.wms
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms 2008-03-08 13:05:34 UTC (rev 30503)
+++ grass/trunk/scripts/r.in.wms/r.in.wms 2008-03-09 04:16:36 UTC (rev 30504)
@@ -379,8 +379,13 @@
else : # xml2 is not available
g.message -w "The 'xml2' program was not found. Proceeding with internal XML parsing which may not be as reliable."
- grep "Name\|Title\|Style\|Layer" "$CAPABILITIES_FILE" | \
- sed -e "s/<Layer .*>/LAYER:/" \
+ sed -e "s/<Layer/\n<Layer/g" \
+ -e "s/<Name>/\n<Name>/g" \
+ -e "s/<Style>/\n<Style>/g" \
+ -e "s/<Title>/\n<Title>/g" \
+ "$CAPABILITIES_FILE" | \
+ grep "Name\|Title\|Style\|Layer" | \
+ sed -e "s/<Layer .*>/LAYER:/" \
-e "s/<\/Layer.*>//" \
-e "s/<Name>\s*\(\w*\)/~\1~/g" \
-e "s/<\/Name>\n//g" \
@@ -540,6 +545,7 @@
r.support map="$GIS_OPT_OUTPUT" description="generated by r.in.wms" history=""
r.support map="$GIS_OPT_OUTPUT" history="$CMDLINE"
+g.message -v message="Map <${GIS_OPT_OUTPUT}> written"
# Clean up:
\rm -f "${TMP}"*
Modified: grass/trunk/scripts/r.in.wms/wms.request
===================================================================
--- grass/trunk/scripts/r.in.wms/wms.request 2008-03-08 13:05:34 UTC (rev 30503)
+++ grass/trunk/scripts/r.in.wms/wms.request 2008-03-09 04:16:36 UTC (rev 30504)
@@ -211,7 +211,8 @@
FOLDERPLUS="${GIS_OPT_FOLDER}/${GIS_OPT_PREFIX}_${GIS_OPT_REGION}"
if [ $GIS_FLAG_C -eq 1 ] ; then
- rm -f "${FOLDERPLUS}*"
+ g.message -v message="Removing files <${FOLDERPLUS}*>"
+ rm -f "$FOLDERPLUS"*
fi
if [ -x "`which wget`" ] ; then
More information about the grass-commit
mailing list