[GRASS-SVN] r53331 - grass/branches/develbranch_6/scripts/r.pack
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 7 04:52:44 PDT 2012
Author: neteler
Date: 2012-10-07 04:52:44 -0700 (Sun, 07 Oct 2012)
New Revision: 53331
Modified:
grass/branches/develbranch_6/scripts/r.pack/r.pack
Log:
strip off mapset to support fully qualified input
Modified: grass/branches/develbranch_6/scripts/r.pack/r.pack
===================================================================
--- grass/branches/develbranch_6/scripts/r.pack/r.pack 2012-10-07 10:29:47 UTC (rev 53330)
+++ grass/branches/develbranch_6/scripts/r.pack/r.pack 2012-10-07 11:52:44 UTC (rev 53331)
@@ -52,9 +52,9 @@
fi
if [ -n "$GIS_OPT_OUTPUT" ] ; then
- outfile="$GIS_OPT_OUTPUT"
+ outfile="`echo $GIS_OPT_OUTPUT | cut -d'@' -f1`"
else
- outfile="$GIS_OPT_INPUT.pack"
+ outfile="`echo $GIS_OPT_INPUT | cut -d'@' -f1`.pack"
fi
#be overly helpful
@@ -87,16 +87,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/$GIS_OPT_INPUT" ] ; then
- cp "$BASEDIR/$ELEMENT/$name" "$TMP_DIR/$ELEMENT"
+ cp "$BASEDIR/$ELEMENT/$GIS_OPT_INPUT" "$TMP_DIR/$ELEMENT"
fi
done
if [ -d "$BASEDIR/cell_misc/$GIS_OPT_INPUT/" ] ; 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