-
Notifications
You must be signed in to change notification settings - Fork 56
/
build
executable file
·37 lines (31 loc) · 1.61 KB
/
build
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
if [[ $# > 0 && $1 == "engine" || $1 == "all" ]];
then
find chrome/content/engine -name \*.js -exec cat > ../bin/Tilt-engine.js {} \;
if [[ $# > 1 && $2 == "minify" ]];
then
java -jar ../bin/google-closure/compiler.jar --language_in ECMASCRIPT5_STRICT --compilation_level SIMPLE_OPTIMIZATIONS --warning_level QUIET --js ../bin/Tilt-engine.js --js_output_file ../bin/Tilt-engine-min.js
fi
fi
if [[ $# > 0 && $1 == "extension" || $1 == "all" ]];
then
find chrome/content -name \*.js ! -path \*ace\/\* ! -path \*colorjack\/\* ! -name Tilt-loader.js -exec cat > ../bin/Tilt-extension.js {} \;
if [[ $# > 1 && $2 == "minify" ]];
then
if [[ $# > 2 && $3 == "optimize" || $3 == "compile" ]];
then
java -jar ../bin/google-closure/compiler.jar --language_in ECMASCRIPT5_STRICT --compilation_level ADVANCED_OPTIMIZATIONS --warning_level QUIET --externs ../bin/google-closure/tilt-externs.jsext --js ../bin/Tilt-extension.js --js_output_file chrome/content/Tilt-extension.js
else
java -jar ../bin/google-closure/compiler.jar --language_in ECMASCRIPT5_STRICT --compilation_level SIMPLE_OPTIMIZATIONS --warning_level QUIET --externs ../bin/google-closure/tilt-externs.jsext --js ../bin/Tilt-extension.js --js_output_file chrome/content/Tilt-extension.js
fi
cp chrome/content/Tilt-extension.js ../bin/Tilt-extension-min.js
else
cp ../bin/Tilt-extension.js chrome/content/Tilt-extension.js
fi
export OSTYPE; make clean; make;
rm chrome/content/Tilt-extension.js
if [[ $# > 1 && $2 == "install" || $3 == "install" || $4 == "install" ]];
then
export OSTYPE; make install;
fi
fi