|
|
@ -2,10 +2,8 @@
|
|
|
|
PWD=`dirname "$0"`
|
|
|
|
PWD=`dirname "$0"`
|
|
|
|
JS_DIR="$PWD/../program/js"
|
|
|
|
JS_DIR="$PWD/../program/js"
|
|
|
|
JAR_DIR='/tmp'
|
|
|
|
JAR_DIR='/tmp'
|
|
|
|
LANG_IN='ECMASCRIPT3'
|
|
|
|
LANG_IN='ECMASCRIPT5'
|
|
|
|
# latest version requires Java 7, we'll use an older one
|
|
|
|
CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-latest.zip'
|
|
|
|
#CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-latest.zip'
|
|
|
|
|
|
|
|
CLOSURE_COMPILER_URL='http://dl.google.com/closure-compiler/compiler-20131014.zip'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do_shrink() {
|
|
|
|
do_shrink() {
|
|
|
|
rm -f "$2"
|
|
|
|
rm -f "$2"
|
|
|
@ -39,7 +37,7 @@ if [ ! -r "$JAR_DIR/compiler.jar" ]; then
|
|
|
|
echo "Please download $CLOSURE_COMPILER_URL and extract compiler.jar to $JAR_DIR/."
|
|
|
|
echo "Please download $CLOSURE_COMPILER_URL and extract compiler.jar to $JAR_DIR/."
|
|
|
|
exit 1
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
(cd $JAR_DIR && unzip "/tmp/$$.zip" "compiler.jar")
|
|
|
|
(cd $JAR_DIR && unzip -p "/tmp/$$.zip" "*.jar" > "$JAR_DIR/compiler.jar")
|
|
|
|
rm -f "/tmp/$$.zip"
|
|
|
|
rm -f "/tmp/$$.zip"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|