iso-country-flags-svg-colle.../scripts/sheets.sh

36 lines
667 B
Bash
Raw Normal View History

2011-12-18 20:21:41 +01:00
#!/bin/sh
BGS="LightGrey White Black Transparent"
echo "Generating sheets .."
for f in $(cd build; ls -d1 png-*); do
echo -n " processing build/$f";
for res in $(cd build/$f; ls -d1 res-*); do
echo "/$res";
for bg in $BGS; do
# echo " $bg";
OUTPD="build/$f/sheets";
FLAGS="build/$f/$res/??.png";
2011-12-18 20:31:39 +01:00
SHEET="$OUTPD/$bg-$res.png";
RES=`echo $res | sed s/^res-//g`
2011-12-18 20:21:41 +01:00
mkdir -p $OUTPD;
echo " $SHEET";
montage \
-limit memory 64 -limit map 128 \
-font DroidSans-Bold.ttf \
-pointsize 8 \
2011-12-18 20:31:39 +01:00
-geometry $RES! \
2011-12-18 20:21:41 +01:00
$FLAGS \
-label "%f" \
-fill Black \
-background $bg \
$SHEET;
done
done
done
echo "done."