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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 13 07:29:47 EDT 2008


Author: hamish
Date: 2008-06-13 07:29:46 -0400 (Fri, 13 Jun 2008)
New Revision: 31698

Modified:
   grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms
   grass/branches/develbranch_6/scripts/r.in.wms/wms.request
Log:
add opt to save capabilities XML file

Modified: grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms
===================================================================
--- grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms	2008-06-13 08:20:20 UTC (rev 31697)
+++ grass/branches/develbranch_6/scripts/r.in.wms/r.in.wms	2008-06-13 11:29:46 UTC (rev 31698)
@@ -169,6 +169,14 @@
 #% guisection: Import
 #%end
 #%option
+#% key: cap_file
+#% type: string
+#% label: Filename to save capabilities XML file to
+#% description: Requires list available layers flag
+#% required: no
+#% guisection: Request
+#%end
+#%option
 #% key: v
 #% type: integer
 #% description: Verbosity level
@@ -426,7 +434,14 @@
 	g.message message=""
 
 	if [ -e "$CAPABILITIES_FILE" ] ; then
-	    \rm -f "$CAPABILITIES_FILE" "${TMP}capabilities.txt" "$TMP"
+	    \rm -f "${TMP}capabilities.txt" "$TMP"
+
+	    if [ -n "$GIS_OPT_CAP_FILE" ] ; then
+		mv "$CAPABILITIES_FILE" "$GIS_OPT_CAP_FILE"
+	    else
+		\rm -f "$CAPABILITIES_FILE"
+	    fi
+    
         fi
         exit 1;
 }

Modified: grass/branches/develbranch_6/scripts/r.in.wms/wms.request
===================================================================
--- grass/branches/develbranch_6/scripts/r.in.wms/wms.request	2008-06-13 08:20:20 UTC (rev 31697)
+++ grass/branches/develbranch_6/scripts/r.in.wms/wms.request	2008-06-13 11:29:46 UTC (rev 31698)
@@ -150,7 +150,7 @@
 defaultIFS="$IFS"
 
 
-#####################
+####################################
 # name:     message
 # purpose:  displays messages to the user
 # usage: message level text
@@ -166,7 +166,7 @@
 BC="bc"
 BCARGS="-l"
 
-#####################3
+####################################
 # name: calculate
 # purpose: perform calculations
 # usage: varname "expr"
@@ -177,7 +177,7 @@
 	eval $1=$c_tmp
 }
 
-################################################################
+####################################
 # Calculate the number of tiles!!
 # Download and them
 GetTiles() {



More information about the grass-commit mailing list