Created
June 14, 2011 23:36
-
-
Save danbeam/1026192 to your computer and use it in GitHub Desktop.
Only $19 if you order today!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=${1:-.}; | |
if [ -z "$YUI" -o ! -r "$YUI" ]; then | |
echo "You need the path to YUI Compressor as env var \$YUI"; | |
exit 1; | |
fi | |
for CSS in `find $DIR -type f -name *.css`; do | |
java -jar $YUI --type css -o ${CSS%.css}.min.css $CSS; | |
done | |
for JS in `find $DIR -type f -name *.js`; do | |
java -jar $YUI --type js -o ${JS%.js}.min.js $JS; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment