[GRASS-SVN] r55160 - grass/branches/develbranch_6/scripts/r.pack

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 22 00:49:12 PST 2013


Author: hamish
Date: 2013-02-22 00:49:12 -0800 (Fri, 22 Feb 2013)
New Revision: 55160

Modified:
   grass/branches/develbranch_6/scripts/r.pack/description.html
   grass/branches/develbranch_6/scripts/r.pack/r.pack
Log:
fixes related to #1637; for user interest, stash a copy of the PROJ_EPSG file from g7's g.proj, if it exists

Modified: grass/branches/develbranch_6/scripts/r.pack/description.html
===================================================================
--- grass/branches/develbranch_6/scripts/r.pack/description.html	2013-02-22 08:25:48 UTC (rev 55159)
+++ grass/branches/develbranch_6/scripts/r.pack/description.html	2013-02-22 08:49:12 UTC (rev 55160)
@@ -4,6 +4,7 @@
 (color table etc) for copying to another computer as a single compressed
 file (gzip compression).
 
+
 <h2>EXAMPLE</h2>
 
 This command saves the raster map "elevation.dem" into the export
@@ -13,12 +14,15 @@
 r.pack elevation.dem
 </pre></div>
 
+
 <h2>SEE ALSO</h2>
 
 <em><a href="r.unpack.html">r.unpack</a></em>
 
+
 <h2>AUTHOR</h2>
 
 Hamish Bowman, Otago University, New Zealand
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/branches/develbranch_6/scripts/r.pack/r.pack
===================================================================
--- grass/branches/develbranch_6/scripts/r.pack/r.pack	2013-02-22 08:25:48 UTC (rev 55159)
+++ grass/branches/develbranch_6/scripts/r.pack/r.pack	2013-02-22 08:49:12 UTC (rev 55160)
@@ -2,7 +2,7 @@
 #  r.pack   --  pack up a raster map:
 #     collect raster map elements => gzip
 #
-#   (c) 2004-2008, 2012 GRASS Development Team
+#   (c) 2004-2013 GRASS Development Team
 #   AUTHOR: Hamish Bowman, Otago University, New Zealand
 #
 #   This program is free software under the GNU General Public License
@@ -52,7 +52,7 @@
 fi
 
 if [ -n "$GIS_OPT_OUTPUT" ] ; then
-   outfile="`echo $GIS_OPT_OUTPUT | cut -d'@' -f1`"
+   outfile="$GIS_OPT_OUTPUT"
 else
    outfile="`echo $GIS_OPT_INPUT | cut -d'@' -f1`.pack"
 fi
@@ -65,6 +65,9 @@
 if [ -z "$name" ] ; then
    g.message -e "Map not found"
    exit 1
+else
+   # strip off mapset to remove fully qualified input
+   name=`echo "$name" | cut -d'@' -f1`
 fi
 
 
@@ -87,17 +90,15 @@
 BASEDIR=`echo "$file" | sed -e 's+/cell/.*$++'`
 OLDDIR=`pwd`
 
-# strip off mapset to remove fully qualified input
-GIS_OPT_INPUT="`echo $GIS_OPT_INPUT | cut -d'@' -f1`"
 for ELEMENT in cats cell cellhd colr fcell grid3 hist ; do
-    if [ -e "$BASEDIR/$ELEMENT/$GIS_OPT_INPUT" ] ; then
-	cp "$BASEDIR/$ELEMENT/$GIS_OPT_INPUT" "$TMP_DIR/$ELEMENT"
+    if [ -e "$BASEDIR/$ELEMENT/$name" ] ; then
+	cp "$BASEDIR/$ELEMENT/$name" "$TMP_DIR/$ELEMENT"
     fi
 done
 
-if [ -d "$BASEDIR/cell_misc/$GIS_OPT_INPUT/" ] ; then
+if [ -d "$BASEDIR/cell_misc/$name/" ] ; then
     mkdir "$TMP_DIR/cell_misc/"
-    cp "$BASEDIR/cell_misc/$GIS_OPT_INPUT/"* "$TMP_DIR/cell_misc/"
+    cp "$BASEDIR/cell_misc/$name/"* "$TMP_DIR/cell_misc/"
 fi
 
 
@@ -110,7 +111,7 @@
 #   (would prefer to use g.proj*, but this way is 5.3 and 5.7 compat)
 eval `g.gisenv`
 
-for SUPPORT in INFO UNITS ; do
+for SUPPORT in INFO UNITS EPSG ; do
    if [ -e "$GISDBASE/$LOCATION_NAME/PERMANENT/PROJ_$SUPPORT" ] ; then
        cp "$GISDBASE/$LOCATION_NAME/PERMANENT/PROJ_$SUPPORT" "$TMP_DIR"
    fi



More information about the grass-commit mailing list