[GRASS-SVN] r43549 - grass/branches/develbranch_6/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 20 23:33:26 EDT 2010


Author: hamish
Date: 2010-09-21 03:33:26 +0000 (Tue, 21 Sep 2010)
New Revision: 43549

Modified:
   grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms
Log:
replace \n with \<newline> for POSIX complaiance (bug #1164)

Modified: grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms
===================================================================
--- grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms	2010-09-21 03:13:24 UTC (rev 43548)
+++ grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms	2010-09-21 03:33:26 UTC (rev 43549)
@@ -389,7 +389,9 @@
 	if [ -x "`which xml2`" ] ; then
 		cat "$CAPABILITIES_FILE" | xml2 | \
 		  grep "Layer/SRS=\|Layer/Name=\|Layer/Title=\|Style/Name=\|Style/Title=\|Layer/Abstract=" | \
-		  sed -e "s/.*Layer\\/Name=/\n\nLAYER: /" \
+		  sed -e 's/.*Layer\\/Name=/\
+\
+LAYER: /' \
 		      -e "s/.*Layer\\/SRS=/  SRS: /" \
 		      -e "s/.*Layer\\/Title=/  Title: /" \
 		      -e "s/.*Layer\\/Abstract=/  |/" \
@@ -399,13 +401,19 @@
 
 	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."
-		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" \
+		sed -e 's/<Layer/\
+<Layer/g' \
+		    -e 's/<Name>/\
+<Name>/g' \
+		    -e 's/<Style>/\
+<Style>/g' \
+		    -e 's/<Title>/\
+<Title>/g' \
 		    "$CAPABILITIES_FILE" | \
 		    grep "Name\|Title\|Style\|Layer" | \
-		    sed -e "s/<Layer .*>/-=-=-=-=-\n\nLAYER:/" \
+		    sed -e 's/<Layer .*>/-=-=-=-=-\
+\
+LAYER:/' \
 		      -e "s/<\/Layer.*>//" \
 		      -e "s/<Name>\s*\([^<]*\)/~\1~/g" \
 		      -e "s/<\/Name>\n\?//g" \



More information about the grass-commit mailing list