]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | mkdir -p compiled | |
3 | rm -f compiled/*.js | |
4 | ||
5 | cd js | |
6 | cat version.js jslib.js irc/ircconnection.js irc/irclib.js irc/baseircclient.js irc/irctracker.js irc/commandparser.js irc/ircclient.js ui/baseui.js ui/baseuiwindow.js ui/colour.js ui/theme.js qwebircinterface.js > ../compiled/qwebirc-concat.js | |
7 | cat ui/swmlayout.js ui/swmui.js > ../compiled/swmui-concat.js | |
8 | ||
9 | error() { | |
10 | cd .. | |
11 | rm compiled/*-compiled.js | |
12 | exit 1 | |
13 | } | |
14 | ||
15 | catit() { | |
16 | cat js/copyright.js compiled/$1-compiled.js > static/js/$1.js | |
17 | } | |
18 | ||
19 | jarit() { | |
20 | SRC=$1 | |
21 | DST=$2 | |
22 | cd compiled | |
23 | java -jar ../bin/yuicompressor-2.3.5.jar $SRC.js > $DST-compiled.js | |
24 | if [ "$?" != 0 ]; then | |
25 | error | |
26 | fi | |
27 | cd .. | |
28 | catit $DST | |
29 | rm compiled/$DST-compiled.js | |
30 | } | |
31 | ||
32 | cd .. | |
33 | jarit qwebirc-concat qwebirc | |
34 | jarit ../js/ui/uglyui uglyui | |
35 | jarit swmui-concat swmui | |
36 | jarit ../js/ui/mochaui mochaui | |
37 | ||
38 | rm compiled/{swmui,qwebirc}-concat.js | |
39 | ||
40 | rmdir compiled |