[GRASS-SVN] r30976 - grass/trunk/scripts/v.rast.stats

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 14 02:13:09 EDT 2008


Author: hamish
Date: 2008-04-14 02:13:05 -0400 (Mon, 14 Apr 2008)
New Revision: 30976

Modified:
   grass/trunk/scripts/v.rast.stats/v.rast.stats
Log:
small clean of error catching

Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats	2008-04-13 17:33:23 UTC (rev 30975)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats	2008-04-14 06:13:05 UTC (rev 30976)
@@ -264,7 +264,7 @@
 
 g.message -v "Adding columns <$ADDCOLS>"
 v.db.addcol map="$VECTOR" columns="$ADDCOLS"
-if [ $? -eq 1 ] ; then
+if [ $? -ne 0 ] ; then
    g.message -e "Cannot continue (problem adding columns)."
    cleanup
    exit 1
@@ -326,8 +326,10 @@
 
 cleanup
 
-g.message "Statistics calculated from raster map <$RASTER> and uploaded to \
+if [ "$EXITCODE" -eq 0 ] ; then
+  g.message "Statistics calculated from raster map <$RASTER> and uploaded to \
     attribute table of vector map <$VECTOR>."
-g.message "Done."
+  g.message "Done."
+fi
 
 exit $EXITCODE



More information about the grass-commit mailing list