fix so --clean gets respected

This commit is contained in:
Eric House 2013-12-04 19:42:18 -08:00
parent ca428d6a63
commit 2eefd14231

View file

@ -9,11 +9,22 @@ fi
CLEAN="" CLEAN=""
if [ $# -gt 1 ]; then usage() {
if [ $1 = '--clean' ]; then echo "usage: $0 [--clean]"
CLEAN=1 exit 1
fi }
fi
while [ $# -ge 1 ]; do
case $1 in
--clean)
CLEAN=1
;;
*)
usage
;;
esac
shift
done
# There needs to be target in the makefile for each of these (giving # There needs to be target in the makefile for each of these (giving
# the output .png size) # the output .png size)
@ -26,6 +37,7 @@ for SVG in img_src/*.svg; do
SVG=$(basename $SVG) SVG=$(basename $SVG)
OUT=res/$DIR/${SVG/.svg/__gen.png} OUT=res/$DIR/${SVG/.svg/__gen.png}
if [ -z "$CLEAN" ]; then if [ -z "$CLEAN" ]; then
echo "not doing clean one"
make -f $(dirname $0)/images.mk $OUT make -f $(dirname $0)/images.mk $OUT
else else
rm -f $OUT rm -f $OUT