Created
January 16, 2013 17:26
-
-
Save captbrogers/4548983 to your computer and use it in GitHub Desktop.
Use a bash script to call YUI Compressor
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 | |
yui='/usr/bin/yui-compressor/build/yuicompressor-2.4.8pre.jar' | |
j='/usr/bin/java' | |
for i in $@ | |
do | |
filename=${i%.*} | |
ext=${i##*.} | |
echo "Compressing $i -> $filename.min.$ext" | |
$j -jar $yui $i -o $filename.min.$ext | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment