Skip to content

Instantly share code, notes, and snippets.

@ilpoldo
Created April 26, 2009 23:29
Show Gist options
  • Save ilpoldo/102217 to your computer and use it in GitHub Desktop.
Save ilpoldo/102217 to your computer and use it in GitHub Desktop.
bash script to run yui compressor on my javascripts
#!/bin/bash
# this script and the yuicompressor jar are in the /compressor folder distributed with the script
# TODO: Copy the license notes in the full version and prepend them to the minified one.
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
dir=`dirname "$abspath"`
echo $dir
java -jar $dir/yuicompressor-2.4.2.jar --nomunge $dir/../myscript.js -o $dir/../myscript.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment