-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.ps1
96 lines (64 loc) · 1.69 KB
/
install.ps1
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
#!/bin/bash
echo "Detecting Operating System..."
echo ""
$OS=-1
If ( "$($ENV:OS)" -ne $null -Or $IsWindows) {
$OS = 3
} ElseIf ($IsLinux) {
$OS = 1
} ElseIf ($IsMacOS) {
$OS = 2
} Else {
echo "Unable to determine OS"
exit -1
}
echo "Done Detecting Operating"
if($OS -eq 1 -Or $OS -eq 2) {
bash ./install.sh
exit
}
echo "Please Install Manually files in bin/"
exit
cd bin
cd Release
cd netcoreapp2.0
cd win-x64
echo "Installing Files..."
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