[GRASS-SVN] r30126 - grass/trunk/scripts/r.in.srtm
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 13 19:42:53 EST 2008
Author: hamish
Date: 2008-02-13 19:42:53 -0500 (Wed, 13 Feb 2008)
New Revision: 30126
Modified:
grass/trunk/scripts/r.in.srtm/r.in.srtm
Log:
quote variables
Modified: grass/trunk/scripts/r.in.srtm/r.in.srtm
===================================================================
--- grass/trunk/scripts/r.in.srtm/r.in.srtm 2008-02-14 00:40:43 UTC (rev 30125)
+++ grass/trunk/scripts/r.in.srtm/r.in.srtm 2008-02-14 00:42:53 UTC (rev 30126)
@@ -115,12 +115,12 @@
fi
# use these from now on:
-FILE=`echo $GIS_OPT_INPUT | sed 's+.hgt++'| sed 's+.zip++'`
+FILE=`echo "$GIS_OPT_INPUT" | sed 's+.hgt++'| sed 's+.zip++'`
TILE=`echo "$FILE" | sed 's+^.*/++'`
FDIR=`echo "$FILE" | sed 's+[^/]*$++'`
if [ -z "$GIS_OPT_OUTPUT" ] ; then
- TILEOUT=$TILE
+ TILEOUT="$TILE"
else
TILEOUT="$GIS_OPT_OUTPUT"
fi
@@ -183,7 +183,7 @@
fi
g.message "Converting input file to BIL..."
-mv $TILE.hgt "$TMPDIR"/$TILE.bil
+mv $TILE.hgt "$TMPDIR"/"$TILE.bil"
LL_LATITUDE=`echo $TILE | cut -b2-3`
LL_LONGITUDE=`echo $TILE | cut -b5-7`
@@ -221,7 +221,7 @@
ULXMAP $ULXMAP
ULYMAP $ULYMAP
XDIM 0.000833333333333
-YDIM 0.000833333333333"> $TILE.hdr
+YDIM 0.000833333333333"> "$TILE.hdr"
else
g.message "Attempting to import 1-arcsec data."
echo "BYTEORDER M
@@ -238,15 +238,15 @@
ULXMAP $ULXMAP
ULYMAP $ULYMAP
XDIM 0.000277777777777778
-YDIM 0.000277777777777778"> $TILE.hdr
+YDIM 0.000277777777777778"> "$TILE.hdr"
fi
#create prj file: To be precise, we would need EGS96! But who really cares...
echo "GEOGCS["wgs84",DATUM["WGS_1984",SPHEROID["wgs84",6378137,298.257223563],TOWGS84[0.000000,0.000000,0.000000]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]" > $TILE.prj
-r.in.gdal in=$TILE.bil out=$TILEOUT
+r.in.gdal in="$TILE.bil" out="$TILEOUT"
-\rm -f $TILE.bil $TILE.hdr $TILE.prj $TILE.hgt.zip
+\rm -f "$TILE.bil" "$TILE.hdr" "$TILE.prj" "$TILE.hgt.zip"
cd ..
rmdir "$TMPDIR"
More information about the grass-commit
mailing list