-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-and-install.sh
executable file
·54 lines (47 loc) · 1.11 KB
/
build-and-install.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
echo "Detecting Operating System..."
echo
OS=-1
if [[ "$OSTYPE" == "linux-gnu" ]]; then
OS=1
elif [[ "$OSTYPE" == "darwin"* ]]; then
OS=2
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo "Please Use Windows Scripts"
OS=1
exit -1
elif [[ "$OSTYPE" == "msys" ]]; then
echo "Please Use Windows Scripts"
OS=1
exit -1
elif [[ "$OSTYPE" == "win32" ]]; then
echo "Please Use Windows Scripts"
exit -1
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo "FreeBSD is not officially supported"
OS=1
else
echo "Unknown Operating System, please Submit Ticket, Your Operating System is '$OSTYPE'"
exit -1
fi
echo "Done Detecting Operating"
echo "Building Project"
echo
if [[ OS -eq 1 ]]; then
dotnet publish -v q -c Release -r linux-x64
rc=$?
elif [[ OS -eq 2 ]]; then
dotnet publish -v q -c Release -r osx-x64
rc=$?
else
echo "Unknown OS Code: $OS"
exit -1
fi
if [[ $rc != 0 ]]; then
echo
echo "Building exited with $rc, Not completing install"
exit $rc
fi
echo
echo "Done Building Project"
echo
./install.sh