-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-ctop.sh
42 lines (35 loc) · 907 Bytes
/
install-ctop.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
#!/bin/bash
# Install ctop
# https://github.com/bcicen/ctop/releases
CTOP_VERSION=0.7.5
HARDWARE=$(uname -m)
SYSTEM=$(uname -s)
if [ "${SYSTEM}" = "Linux" ]; then
if [ "${HARDWARE}" = "armv7l" ]; then
SYSTEM="linux"
HARDWARE="arm"
elif [ "${HARDWARE}" = "aarch64" ]; then
SYSTEM="linux"
HARDWARE="arm64"
elif [ "${HARDWARE}" = "x86_64" ]; then
SYSTEM="linux"
HARDWARE="amd64"
else
echo "This platform does'nt suppot yet!!"
exit 1
fi
elif [ "${SYSTEM}" = "Darwin" ]; then
if [ "${HARDWARE}" = "x86_64" ]; then
SYSTEM="darwin"
HARDWARE="amd64"
else
echo "This platform does'nt suppot yet!!"
exit 1
fi
else
echo "This platform does'nt suppot yet!!"
exit 1
fi
curl -L https://github.com/bcicen/ctop/releases/download/v${CTOP_VERSION}/ctop-${CTOP_VERSION}-${SYSTEM}-${HARDWARE} -o /usr/local/bin/ctop
chmod +x /usr/local/bin/ctop
exit 0