blob: f2ecb0996991fab7e73429067e38519e2ed44b90 (
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
|
#!/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/
else
mv "$2" $builddir
cd $builddir/
fi
nwbuild -p "$1" .
mv build/* $scriptdir/
|