From bdc9ef7d27cf44c1f88dea47d05d8fce7534147a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 16 Aug 2014 19:44:44 +0200 Subject: [PATCH] Convert spaces back to tabs in the end of build.sh --- build/preprocess.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build/preprocess.sh b/build/preprocess.sh index 78e14c8c..bdee8f0e 100755 --- a/build/preprocess.sh +++ b/build/preprocess.sh @@ -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