[GRASS-SVN] r50216 - grass/trunk/gui/images/symbols
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 16 19:41:15 EST 2012
Author: hamish
Date: 2012-01-16 16:41:15 -0800 (Mon, 16 Jan 2012)
New Revision: 50216
Modified:
grass/trunk/gui/images/symbols/README
Log:
always quote file/pathname variables; echo needed -e; add optipng hint
Modified: grass/trunk/gui/images/symbols/README
===================================================================
--- grass/trunk/gui/images/symbols/README 2012-01-17 00:39:29 UTC (rev 50215)
+++ grass/trunk/gui/images/symbols/README 2012-01-17 00:41:15 UTC (rev 50216)
@@ -6,26 +6,29 @@
----------------------------------
You can use following script (requires Inkscape), run script in symbol group
directory (e.g. ./lib/symbol/symbol/basic) within a GRASS session.
+Optipng will try to make the file as small as possible.
#!/bin/sh
-DIR=$(basename $PWD)
+DIR="$(basename $PWD)"
PSMAP_FILE=tmp.psmap
PS_FILE=tmp.ps
PNG_OUT=png_out
-rm -r $PNG_OUT
-mkdir $PNG_OUT
+rm -r "$PNG_OUT"
+mkdir "$PNG_OUT"
for SYMBOL in *
do
- if [ -f $SYMBOL ]
+ if [ -f "$SYMBOL" ]
then
- echo "border none\npoint 50% 50%\n symbol $DIR/$SYMBOL\n end\nend" > $PSMAP_FILE
- ps.map input=$PSMAP_FILE output=$PS_FILE
- inkscape -f $PS_FILE --export-png=$PNG_OUT/$SYMBOL.png -D -h=30
+ echo -e "border none\npoint 50% 50%\n symbol $DIR/$SYMBOL\n end\nend" > "$PSMAP_FILE"
+ ps.map input="$PSMAP_FILE" output="$PS_FILE"
+ inkscape -f "$PS_FILE" --export-png="$PNG_OUT/$SYMBOL.png" -D -h=30
- rm $PSMAP_FILE $PS_FILE
+ rm "$PSMAP_FILE" "$PS_FILE"
+
+ #optipng -o5 "$PNG_OUT/$SYMBOL.png"
else
- echo $SYMBOL is not regular file
+ echo "$SYMBOL is not regular file"
fi
done
More information about the grass-commit
mailing list