blob: 72b078661e2804961ffa4559f70a992471c53efb (
plain)
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
|
#!/bin/bash
if [[ "$snapsource" == "" ]]
then
export snapsource="https://github.com/Gubolin/snap.git"
fi
if [[ $1 = "" ]]
then
echo "Usage: desktop.sh PLATFORM [BUILDSOURCE]"
exit 0
fi
scriptdir=$(readlink -e ".")
# Requirements:
# git, zip, nodejs
# node-webkit (https://github.com/rogerwang/node-webkit), node-webkit-builder (https://github.com/mllrsohn/node-webkit-builder)
builddir=$(mktemp -d)
if [[ $2 == "" ]]
then
git clone "$snapsource" $builddir
cd $builddir/
git checkout mobileapp
else
mv "$2" $builddir
cd $builddir/
fi
nwbuild -p "$1" .
mv build/* $scriptdir/
|