]>
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/url.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 | xjarit() { | |
20 | SRC=$1 | |
21 | DST=$2 | |
22 | cd compiled | |
23 | java -jar ../bin/yuicompressor-2.3.5.jar $SRC.js > $DST.js | |
24 | if [ "$?" != 0 ]; then | |
25 | error | |
26 | fi | |
27 | cd .. | |
28 | } | |
29 | ||
30 | jarit() { | |
31 | SRC=$1 | |
32 | DST=$2-compiled | |
33 | ||
34 | xjarit $SRC $DST | |
35 | catit $DST | |
36 | rm compiled/$DST.js | |
37 | } | |
38 | ||
39 | cd .. | |
40 | xjarit ../static/js/mochaui/mocha ../static/js/mochaui/mocha-compressed | |
41 | ||
42 | jarit qwebirc-concat qwebirc | |
43 | jarit ../js/ui/uglyui uglyui | |
44 | jarit swmui-concat swmui | |
45 | jarit ../js/ui/mochaui mochaui | |
46 | jarit ../js/ui/qui qui | |
47 | ||
48 | rm compiled/{swmui,qwebirc}-concat.js | |
49 | ||
50 | rmdir compiled |