]>
Commit | Line | Data |
---|---|---|
1354d172 | 1 | #!/bin/bash |
a089699c AD |
2 | |
3 | # This script rebuilds customized layer of Dojo for tt-rss | |
4 | # Place unpacked Dojo source release in this directory and run this script. | |
5 | # It will automatically replace previous build of Dojo in ../dojo | |
6 | ||
7 | # Dojo requires Java runtime to build. Further information on rebuilding Dojo | |
8 | # is available here: http://dojotoolkit.org/reference-guide/build/index.html | |
9 | ||
6887a0f5 | 10 | VERSION=1.12.1 |
4a888413 JC |
11 | |
12 | # Download and extract dojo src code if it doesn't already exist | |
13 | if [ ! -d "dojo" ]; then | |
14 | TARBALL=dojo-release-$VERSION-src.tar.gz | |
15 | if [ ! -f $TARBALL ]; then | |
16 | wget -q http://download.dojotoolkit.org/release-$VERSION/$TARBALL | |
17 | fi | |
18 | tar -zxf $TARBALL | |
19 | mv dojo-release-$VERSION-src/* . | |
20 | rm -rf dojo-release-$VERSION-src | |
21 | fi | |
22 | ||
a089699c | 23 | if [ -d util/buildscripts/ ]; then |
1354d172 AD |
24 | rm -rf release/dojo |
25 | ||
a089699c | 26 | pushd util/buildscripts |
4a888413 | 27 | ./build.sh profile=../../tt-rss action=release optimize=shrinksafe cssOptimize=comments |
a089699c AD |
28 | popd |
29 | ||
30 | if [ -d release/dojo ]; then | |
81bea17a | 31 | rm -rf ../dojo ../dijit |
1354d172 AD |
32 | cp -r release/dojo/dojo .. |
33 | cp -r release/dojo/dijit .. | |
7caa48fe AD |
34 | |
35 | cd .. | |
36 | ||
37 | find dojo -name '*uncompressed*' -exec rm -- {} \; | |
38 | find dijit -name '*uncompressed*' -exec rm -- {} \; | |
a089699c AD |
39 | else |
40 | echo $0: ERROR: Dojo build seems to have failed. | |
41 | fi | |
42 | else | |
43 | echo $0: ERROR: Please unpack Dojo source release into current directory. | |
4a888413 | 44 | fi |