-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·52 lines (50 loc) · 1.86 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
#!/bin/bash
VERSION=v0.5.8
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Downloading debian client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/debian
echo "Installing Master of Ceremony ${VERSION}"
chmod +x debian
mv debian /usr/local/bin/mc
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo "Downloading debian client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/debian
echo "Installing Master of Ceremony ${VERSION}"
chmod +x debian
mv debian /usr/local/bin/mc
elif [[ "$OSTYPE" == "debian"* ]]; then
echo "Downloading debian client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/debian
echo "Installing Master of Ceremony ${VERSION}"
chmod +x debian
mv debian /usr/local/bin/mc
elif [[ "$OSTYPE" == "msys" ]]; then
echo "Downloading debian client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/debian
echo "Installing Master of Ceremony ${VERSION}"
chmod +x debian
mv debian /usr/local/bin/mc
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo "Downloading debian client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/debian
echo "Installing Master of Ceremony ${VERSION}"
chmod +x debian
mv debian /usr/local/bin/mc
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Downloading darwin client."
curl -LO https://github.com/webbrandon/mc/releases/download/${VERSION}/darwin
echo "Installing Master of Ceremony ${VERSION}"
chmod +x darwin
mv darwin /usr/local/bin/mc
else
printf "System not supported. Attempting to build from source. You must have rust installed."
curl -LO https://github.com/webbrandon/mc/archive/${VERSION}.tar.gz
tar -xvzf ${VERSION}.tar.gz
cd ${VERSION}
cargo build --release
chmod +x target/release/mc
mv target/release/mc /usr/local/bin/mc
cd ..
rm -rf mc-${VERSION}
fi
exit 0