Skip to content

Instantly share code, notes, and snippets.

@keriati
Created March 29, 2012 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keriati/2242644 to your computer and use it in GitHub Desktop.
Save keriati/2242644 to your computer and use it in GitHub Desktop.
Compress all javascript files in the directory
#!/bin/bash
for filein in `find . -name "*.js" | grep -v \.min\.js`
do
fileout=${filein/\.js/\.min\.js}
echo "Compressing $filein => $fileout"
java -jar ~/bin/yuicompressor-2.4.7.jar $filein > $fileout
done
echo "Finished."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment