[GRASS-SVN] r49563 - grass/branches/develbranch_6/scripts/r.reclass.area

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 6 10:50:55 EST 2011


Author: martinl
Date: 2011-12-06 07:50:55 -0800 (Tue, 06 Dec 2011)
New Revision: 49563

Modified:
   grass/branches/develbranch_6/scripts/r.reclass.area/r.reclass.area
Log:
r.reclass: improve error message if greater= and lesser= are defined


Modified: grass/branches/develbranch_6/scripts/r.reclass.area/r.reclass.area
===================================================================
--- grass/branches/develbranch_6/scripts/r.reclass.area/r.reclass.area	2011-12-06 15:45:15 UTC (rev 49562)
+++ grass/branches/develbranch_6/scripts/r.reclass.area/r.reclass.area	2011-12-06 15:50:55 UTC (rev 49563)
@@ -84,12 +84,16 @@
  exit 1
 fi
 
-if [ -z "$GIS_OPT_GREATER" -a -z "$GIS_OPT_LESSER" ] ||
-    [ -n "$GIS_OPT_GREATER" -a -n "$GIS_OPT_LESSER" ]; then
+if [ -z "$GIS_OPT_GREATER" -a -z "$GIS_OPT_LESSER" ] ; then
   g.message -e message="You have to specify either lesser= or greater="
   exit 1
 fi
 
+if [ -n "$GIS_OPT_GREATER" -a -n "$GIS_OPT_LESSER" ] ; then
+  g.message -e message="lesser= and greater= are mutually exclusive"
+  exit 1
+fi
+
 if [ -n "$GIS_OPT_LESSER" ] ; then
   op=0
   limit="$GIS_OPT_LESSER"



More information about the grass-commit mailing list