Convert spaces back to tabs in the end of build.sh

This commit is contained in:
Jürg Lehni 2014-08-16 19:44:44 +02:00
parent 0e8b3accdd
commit bdc9ef7d27

View file

@ -34,12 +34,9 @@ OPTIONS=$(printf '%q' $(node -e "
"))
# Build the prepo.js command out of it, passing on version and date as defines:
COMMAND="../node_modules/.bin/prepro -o $OPTIONS -o '{ \"date\": \"$DATE\" }' $3 $2"
# Flags to pass to prepro
if [ $1 = "stripped" ]; then FLAGS="-c"; else FLAGS=""; fi
case $1 in
commented)
eval $COMMAND > $4
;;
stripped)
eval "$COMMAND -c" > $4
;;
esac
eval "$COMMAND $FLAGS" > $4
# Now convert 4 spaces to tabs, to shave of some bytes (quite a few KB actually)
unexpand -t 4 $4 > "$4-tabs" && mv "$4-tabs" $4