forked from wolframkriesing/object-browser
/
build.sh
executable file
·45 lines (31 loc) · 989 Bytes
/
build.sh
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
38
39
40
41
42
43
44
#
# Tt copies the files needed for making the
# W3C widget build in the right location.
#
rm -Rf tmp
# Create the directory structure we will need within the wgt file.
mkdir -p tmp/src/js
mkdir -p tmp/src/css
mkdir -p tmp/src/img
cd tmp/src
# All JavaScript files, that need to be included in the widget.
cp ../../src/js/*.js ./js
cp ../../src/css/*.css ./css
cp ../../src/img/*.png ./img
# All other files.
cp ../../src/index.html .
cp ../../src/config.xml .
# Create the wgt file, which is the final opera widget!
rm ../../dist/object-browser.wgt
zip -r ../../dist/object-browser.wgt config.xml index.html js/ css/ img/
#
# Create the Nokia WRT widget.
#
rm config.xml
cp ../../src/Info.plist .
cd .. # Move to /tmp/ so we have a "src" directory which we can zip then
# A nokia WRT widget has to be in the directory "src" for packaging it ... for whatever reason, but it wont install otherwise ... grrrr
zip -r ../dist/object-browser.wgz src/*
# Clean up.
cd ..
rm -Rf tmp