Load sorted tag list using raw git objects
[gitphp.git] / util / minify.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#
# minify.sh
#
# Minfies javascript files
#
# @author Christopher Han <xiphux@gmail.com>
# @copyright Copyright (c) 2010 Christopher Han
# @package GitPHP
# @subpackage util
#
 
JSDIR="js"
COMPRESSORDIR="lib/yuicompressor/build"
COMPRESSORJAR="yuicompressor-2.4.2.jar"
 
JSEXT=".js"
MINEXT=".min.js"
 
rm -f ${JSDIR}/*${MINEXT}
 
for i in ${JSDIR}/*${JSEXT}; do
        echo "Minifying ${i}..."
        java -jar "${COMPRESSORDIR}/${COMPRESSORJAR}" --charset utf-8 -o "${i%$JSEXT}${MINEXT}" "${i}"
done
 
comments