[GRASS-SVN] r40726 - grass/branches/develbranch_6/general/g.parser

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 28 10:29:33 EST 2010


Author: glynn
Date: 2010-01-28 10:29:33 -0500 (Thu, 28 Jan 2010)
New Revision: 40726

Modified:
   grass/branches/develbranch_6/general/g.parser/test.sh
Log:
Fixes to example script:
 Quote variable expansions
 All variables must be upper-case (lower-case doesn't work on Windows)


Modified: grass/branches/develbranch_6/general/g.parser/test.sh
===================================================================
--- grass/branches/develbranch_6/general/g.parser/test.sh	2010-01-28 14:38:11 UTC (rev 40725)
+++ grass/branches/develbranch_6/general/g.parser/test.sh	2010-01-28 15:29:33 UTC (rev 40726)
@@ -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