[GRASS-SVN] r68186 - grass/branches/releasebranch_6_4/scripts/r.pack

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 31 03:26:59 PDT 2016


Author: neteler
Date: 2016-03-31 03:26:59 -0700 (Thu, 31 Mar 2016)
New Revision: 68186

Modified:
   grass/branches/releasebranch_6_4/scripts/r.pack/r.pack
Log:
r.pack: strip off mapset to remove fully qualified input

Modified: grass/branches/releasebranch_6_4/scripts/r.pack/r.pack
===================================================================
--- grass/branches/releasebranch_6_4/scripts/r.pack/r.pack	2016-03-31 03:59:16 UTC (rev 68185)
+++ grass/branches/releasebranch_6_4/scripts/r.pack/r.pack	2016-03-31 10:26:59 UTC (rev 68186)
@@ -52,7 +52,7 @@
 fi
 
 if [ -n "$GIS_OPT_OUTPUT" ] ; then
-   outfile="$GIS_OPT_OUTPUT"
+   outfile="`echo $GIS_OPT_OUTPUT | cut -d'@' -f1`"
 else
    outfile="`echo $GIS_OPT_INPUT | cut -d'@' -f1`.pack"
 fi
@@ -90,15 +90,17 @@
 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/$name" ] ; then
-	cp "$BASEDIR/$ELEMENT/$name" "$TMP_DIR/$ELEMENT"
+	cp "$BASEDIR/$ELEMENT/$GIS_OPT_INPUT" "$TMP_DIR/$ELEMENT"
     fi
 done
 
 if [ -d "$BASEDIR/cell_misc/$name/" ] ; then
     mkdir "$TMP_DIR/cell_misc/"
-    cp "$BASEDIR/cell_misc/$name/"* "$TMP_DIR/cell_misc/"
+    cp "$BASEDIR/cell_misc/$GIS_OPT_INPUT/"* "$TMP_DIR/cell_misc/"
 fi
 
 



More information about the grass-commit mailing list