photofloat/web/css/css-minify.sh
Joachim Tingvold 37db1402c5 Minor changes.
2015-05-05 10:08:51 +02:00

13 lines
337 B
Bash
Executable File

#!/bin/bash
# minify all .css-files
ls -1 *.css|grep -Ev "min.css$" | while read cssfile; do
newfile="${cssfile%.*}.min.css"
echo "$cssfile --> $newfile"
curl -X POST -s --data-urlencode "input@$cssfile" http://cssminifier.com/raw > $newfile
done
# merge all into one single file
rm -f styles.min.css
cat *.min.css > styles.min.css