[GRASS-SVN] r52233 - grass/branches/develbranch_6/scripts/r.unpack

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 26 22:27:57 PDT 2012


Author: hamish
Date: 2012-06-26 22:27:57 -0700 (Tue, 26 Jun 2012)
New Revision: 52233

Modified:
   grass/branches/develbranch_6/scripts/r.unpack/r.unpack
Log:
fix projection check

Modified: grass/branches/develbranch_6/scripts/r.unpack/r.unpack
===================================================================
--- grass/branches/develbranch_6/scripts/r.unpack/r.unpack	2012-06-26 22:53:04 UTC (rev 52232)
+++ grass/branches/develbranch_6/scripts/r.unpack/r.unpack	2012-06-27 05:27:57 UTC (rev 52233)
@@ -2,7 +2,7 @@
 #  r.unpack   --  unpack up a raster map packed with r.pack:
 #     tar+gzip'd map elements => GRASS 6 mapset structure
 #
-#   (c) 2004-2008, 2012 GRASS Development Team
+#   (c) 2004-2012 by Hamish Bowman, and The GRASS Development Team
 #   AUTHOR: Hamish Bowman, Otago University, New Zealand
 #
 #   This program is free software under the GNU General Public
@@ -110,7 +110,7 @@
 fi
 
 eval `g.findfile element=cell file="$MAP_NAME" mapset=.`
-if [ ! -z "$file" ] && [ "$GRASS_OVERWRITE" -ne 1 ] ; then
+if [ -n "$file" ] && [ "$GRASS_OVERWRITE" -ne 1 ] ; then
    g.message -e "Raster map <$MAP_NAME> already exists"
    cleanup
    exit 1
@@ -129,7 +129,8 @@
 cd "$DATA_NAME"/
 
 # check projection compatibility in a rather crappy way
-if [ ! -z `diff PROJ_INFO "$MSET_DIR"/../PERMANENT/PROJ_INFO` ] ; then
+if [ `diff -u PROJ_INFO "$MSET_DIR"/../PERMANENT/PROJ_INFO | wc -l` -ne 0 ] ; then
+    diff -u PROJ_INFO "$MSET_DIR"/../PERMANENT/PROJ_INFO
     if [ $GIS_FLAG_O -eq 1 ] ; then
         g.message -w "Projection information does not match. Proceeding.."
     else



More information about the grass-commit mailing list