-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpackage.sh
56 lines (49 loc) · 967 Bytes
/
package.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
#!/bin/bash
name=""
if [ "$1" = "win32" ]; then
if [ "$2" = "x64" ]; then
name="et.go.exe"
else if [ "$2" = "ia32" ]; then
name="et.go.32.exe"
fi
fi
else if [ "$1" = "linux" ]; then
if [ "$2" = "x64" ]; then
name="et.go.linux"
else if [ "$2" = "ia32" ]; then
name="et.go.32.linux"
fi
fi
else if [ "$1" = "darwin" ]; then
name="et.go.darwin"
fi
fi
fi
if [ "$name" = "" ]; then
echo "Unexpected input!"
exit
fi
cp "./core/"$name "./src/core/"$name
cd "./src"
if [ "$1" = "win32" ]; then
if [ "$2" = "x64" ]; then
npm run-script package-win
else if [ "$2" = "ia32" ]; then
npm run-script package-win-32
fi
fi
else if [ "$1" = "linux" ]; then
if [ "$2" = "x64" ]; then
npm run-script package-linux
else if [ "$2" = "ia32" ]; then
npm run-script package-linux-32
fi
fi
else if [ "$1" = "darwin" ]; then
npm run-script package-darwin
fi
fi
fi
cd ..
rm "./src/core/"$name
exit