-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·106 lines (77 loc) · 2.16 KB
/
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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/bash
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"
cd bin
cd Release
cd netcoreapp2.0
if [[ OS -eq 1 ]]; then
cd linux-x64
elif [[ OS -eq 2 ]]; then
cd osx-x64
else
echo "Unknown OS Code: $OS"
exit -1
fi
echo "Installing Files..."
sudo mkdir -p /usr/local/lib/ckbuild/
echo " Installing Executable"
sudo cp ckbuild /usr/local/lib/ckbuild/
echo " Installing Required Linux Shared Libraries"
sudo cp ./*.so /usr/local/lib/ckbuild/
echo " Installing Required Mac Shared Libraries"
sudo cp ./*.dylib /usr/local/lib/ckbuild/
echo " Installing Required Windows Shared Libraries"
sudo cp ./*.dll /usr/local/lib/ckbuild/
echo " Installing non-binary files (.json and .pdb)"
#sudo cp ./*.txt /usr/local/lib/ckbuild/
sudo cp ./*.json /usr/local/lib/ckbuild/
sudo cp ./*.pdb /usr/local/lib/ckbuild/
echo "Done Installing Files"
echo
echo "Creating Symlinks..."
echo " Creating ckbuild Symlink"
sudo ln -sf /usr/local/lib/ckbuild/ckbuild /usr/local/bin/ckbuild
echo " Creating ckb Symlink"
sudo ln -sf /usr/local/lib/ckbuild/ckbuild /usr/local/bin/ckb
echo "Done Creating Symlinks"
echo
echo "Setting Permissions for..."
echo " ckbuild"
sudo chmod +xr /usr/local/bin/ckbuild
echo " ckb"
sudo chmod +xr /usr/local/bin/ckb
echo "Done Setting Permissions"
echo
echo "Starting Dry Run to generate caches"
ckbuild > /dev/null
echo "Finished Dry Run"
echo
echo
echo
echo "Installed Codekraft Build Utility to /usr/local/lib"
echo "Use 'ckbuild' or 'ckb' to Run It"
echo