-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sh
executable file
·80 lines (64 loc) · 1.32 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
if [ -z "$1" ]
then
echo "Please specify destination platform"
echo "You can choose --win, --linux, --mac, --unix (linux & mac) or --all"
echo "i.e.: ./build.sh linux"
exit 1
fi
platform=$1
function buildWin {
node ./proton_client_win.js
}
function buildLinux {
node ./proton_client_linux.js
while true; do
read -p "Do you wish to create Linux dist packages?" yn
case $yn in
[Yy]* ) distLinux | exit 2;;
[Nn]* ) exit 0;;
* ) echo "Please answer yes or no.";;
esac
done
}
function buildMac {
node ./proton_client_mac.js
}
function buildUnix {
buildLinux
buildMac
}
function buildAll {
buildWin
buildLinux
buildMac
}
function distLinux {
cd ./dist/linux/
./build_dists_linux.sh
}
if [ $platform == --win ]
then
echo "Building for Windows"
buildWin
elif [ $platform == --linux ]
then
echo "Building for linux"
buildLinux
elif [ $platform == --mac ]
then
echo "Building for Mac"
buildMac
elif [ $platform == --unix ]
then
echo "Building for Linux & Mac"
buildUnix
elif [ $platform == --all ]
then
echo "Building for all platforms"
buildAll
else
echo "You didn't specify a valid platform"
exit 2
fi
exit 0