[GRASS-SVN] r57567 - grass/branches/releasebranch_6_4/scripts/r.unpack

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 31 23:19:21 PDT 2013


Author: hamish
Date: 2013-08-31 23:19:21 -0700 (Sat, 31 Aug 2013)
New Revision: 57567

Modified:
   grass/branches/releasebranch_6_4/scripts/r.unpack/r.unpack
Log:
fix projection check (merge r52233 from devbr6)

Modified: grass/branches/releasebranch_6_4/scripts/r.unpack/r.unpack
===================================================================
--- grass/branches/releasebranch_6_4/scripts/r.unpack/r.unpack	2013-09-01 06:15:02 UTC (rev 57566)
+++ grass/branches/releasebranch_6_4/scripts/r.unpack/r.unpack	2013-09-01 06:19:21 UTC (rev 57567)
@@ -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
@@ -114,7 +114,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
@@ -133,7 +133,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