summaryrefslogtreecommitdiff
path: root/desktop.sh
blob: 8b0e21c7af3cb9578d4a1e0f8418910e2e458117 (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
#!/bin/bash

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 https://github.com/Gubolin/snap.git $builddir
    cd $builddir/
    git checkout mobileapp
else
    mv "$2" $builddir
    cd $builddir/
fi

# remove mobile config
rm config.xml

nwbuild -p "$1" .

mv build/* $scriptdir/