Improve white-space handling in preprocess.sh script

This commit is contained in:
Jürg Lehni 2014-08-25 13:04:35 +02:00
parent a564480522
commit 02b91d4829

View file

@ -39,4 +39,6 @@ if [ $1 = "stripped" ]; then FLAGS="-c"; else FLAGS=""; fi
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
unexpand -t 4 -a $4 > "$4-tabs" && mv "$4-tabs" $4
# Remove trailing white-space on each line
perl -p -i -e "s/[ \t]*$//g" $4