We wrote a shell script that runs all the files through the YUI compressor , and then binds them all together. It may look complicated at first, but it is not. This script turned out to be our one-command deployment for our application.
This shell has many other features specific to our internal architecture (git, Erlang, ...), so I cannot easily extract this specific part. But yahoo doc is well done.
source share