]>
Commit | Line | Data |
---|---|---|
9cdf0754 CP |
1 | #!/bin/sh |
2 | mkdir -p compiled | |
3 | rm -f compiled/*.js | |
4 | ||
5 | cd js | |
66de775f | 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 ui/genericlogin.js irc/commandhistory.js qwebircinterface.js > ../compiled/qwebirc-concat.js |
9cdf0754 | 7 | cat ui/swmlayout.js ui/swmui.js > ../compiled/swmui-concat.js |
9cdf0754 | 8 | |
271d7fb1 | 9 | error() { |
9cdf0754 CP |
10 | cd .. |
11 | rm compiled/*-compiled.js | |
12 | exit 1 | |
13 | } | |
14 | ||
cfd8616d CP |
15 | catit() { |
16 | cat js/copyright.js compiled/$1-compiled.js > static/js/$1.js | |
17 | } | |
18 | ||
08137ae6 | 19 | xjarit() { |
89e02585 CP |
20 | local SRC=$1 |
21 | local DST=$2 | |
77b32b56 | 22 | cd compiled |
08137ae6 | 23 | java -jar ../bin/yuicompressor-2.3.5.jar $SRC.js > $DST.js |
9cdf0754 CP |
24 | if [ "$?" != 0 ]; then |
25 | error | |
26 | fi | |
cfd8616d | 27 | cd .. |
08137ae6 CP |
28 | } |
29 | ||
30 | jarit() { | |
31 | SRC=$1 | |
89e02585 | 32 | DST=$2 |
08137ae6 | 33 | |
89e02585 | 34 | xjarit $SRC $DST-compiled |
cfd8616d | 35 | catit $DST |
89e02585 | 36 | rm compiled/$DST-compiled.js |
9cdf0754 CP |
37 | } |
38 | ||
77b32b56 | 39 | cd .. |
08137ae6 CP |
40 | xjarit ../static/js/mochaui/mocha ../static/js/mochaui/mocha-compressed |
41 | ||
9cdf0754 CP |
42 | jarit qwebirc-concat qwebirc |
43 | jarit ../js/ui/uglyui uglyui | |
44 | jarit swmui-concat swmui | |
77b32b56 | 45 | jarit ../js/ui/mochaui mochaui |
f4ae92cc | 46 | jarit ../js/ui/qui qui |
77b32b56 CP |
47 | |
48 | rm compiled/{swmui,qwebirc}-concat.js | |
9cdf0754 | 49 | |
9cdf0754 | 50 | rmdir compiled |