[GRASS-SVN] r43514 - grass/branches/releasebranch_6_4/general/g.parser

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 18 15:41:19 EDT 2010


Author: neteler
Date: 2010-09-18 19:41:19 +0000 (Sat, 18 Sep 2010)
New Revision: 43514

Modified:
   grass/branches/releasebranch_6_4/general/g.parser/description.html
   grass/branches/releasebranch_6_4/general/g.parser/test.sh
Log:
backport: example cosmetics

Modified: grass/branches/releasebranch_6_4/general/g.parser/description.html
===================================================================
--- grass/branches/releasebranch_6_4/general/g.parser/description.html	2010-09-18 19:40:54 UTC (rev 43513)
+++ grass/branches/releasebranch_6_4/general/g.parser/description.html	2010-09-18 19:41:19 UTC (rev 43514)
@@ -9,22 +9,9 @@
 
 <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
 
-
 <h2>NAME</h2>
 <em><b>g.parser</b></em>
 
-<h2>SYNOPSIS</h2>
-<b>g.parser help</b><br>
-<b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
-
-<h3>Flags:</h3>
-<DL>
-<DT><b>-t</b></DT>
-<DD>Print strings for translation</DD>
-<DT><b>-s</b></DT>
-<DD>Write option values to stdout instead of reinvoking script</DD>
-</DL>
-
 <h2>DESCRIPTION</h2>
 
 The <em>g.parser</em> module provides full parser support for GRASS
@@ -32,7 +19,6 @@
 template, and command line option checking. In this way a simple
 script can very quickly be made into a full-fledged GRASS module.
 
-
 <h2>OPTIONS</h2>
 
 Unless the <b>-s</b> switch is used, the arguments are stored in
@@ -77,7 +63,18 @@
 #%end
 </pre></div>
 
+<h2>SYNOPSIS</h2>
+<b>g.parser help</b><br>
+<b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
 
+<h3>Flags:</h3>
+<DL>
+<DT><b>-t</b></DT>
+<DD>Print strings for translation</DD>
+<DT><b>-s</b></DT>
+<DD>Write option values to stdout instead of reinvoking script</DD>
+</DL>
+
 <h2>NOTES</h2>
 
 An option can be instructed to allow multiple inputs by adding the
@@ -121,7 +118,6 @@
 script should behave the same way regardless of whether they were set
 by --o, --q or --v being passed to the script or set by other means.
 
-
 <h2>AUTOMATED SCRIPT CREATION</h2>
 
 The flag <b>--script</b> added to a GRASS command, generates shell

Modified: grass/branches/releasebranch_6_4/general/g.parser/test.sh
===================================================================
--- grass/branches/releasebranch_6_4/general/g.parser/test.sh	2010-09-18 19:40:54 UTC (rev 43513)
+++ grass/branches/releasebranch_6_4/general/g.parser/test.sh	2010-09-18 19:41:19 UTC (rev 43514)
@@ -37,19 +37,19 @@
 fi
 
 if [ "$1" != "@ARGS_PARSED@" ] ; then
-  exec $GISBASE/bin/g.parser "$0" "$@"
+  exec "$GISBASE/bin/g.parser" "$0" "$@"
 fi
 
 #add your code here
 echo ""
-if [ $GIS_FLAG_f -eq 1 ] ; then
+if [ "$GIS_FLAG_F" -eq 1 ] ; then
   echo "Flag -f set"
 else
   echo "Flag -f not set"
 fi
 
-echo "Value of GIS_OPT_option1: '$GIS_OPT_option1'"
-echo "Value of GIS_OPT_raster: '$GIS_OPT_raster'"
-echo "Value of GIS_OPT_vect: '$GIS_OPT_vector'"
+echo "Value of option1=: '$GIS_OPT_OPTION1'"
+echo "Value of raster=: '$GIS_OPT_RASTER'"
+echo "Value of vect=: '$GIS_OPT_VECTOR'"
 
 #add your code here



More information about the grass-commit mailing list