-
Notifications
You must be signed in to change notification settings - Fork 9
/
install.sh
58 lines (53 loc) · 1.38 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
#! /bin/sh
OS=$(uname -s)
arch=$(arch)
echo "$OS"
echo "$arch"
case $OS in
MSYS_NT-10.0)
echo "this script is not supported on Windows"
echo " - Download kubemqctl from: https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl.exe"
echo " - Place the file under e.g. C:\Program Files\Kubemqctl\kubemqctl.exe"
echo " - Add that directory to your system path to access it from any command prompt"
exit 1
;;
Darwin)
filename="kubemqctl_darwin_amd64"
;;
Linux)
case $arch in
x86_64)
filename="kubemqctl_linux_amd64"
;;
i386)
filename="kubemqctl_linux_386"
;;
*)
echo "There is no kubemqctl $OS support for $arch" >&2
exit 1
;;
esac
;;
*)
echo "There is no kubemqctl support for $OS/$arch (yet...)" >&2
exit 1
;;
esac
#set -eu
#filename="kubemqctl_linux_amd64"
url=https://github.com/kubemq-io/kubemqctl/releases/download/latest/${filename}
(
echo "Downloading ${filename}..."
curl -LO "${url}" -o /usr/local/bin/kubemqctl
echo ""
echo "Download complete!"
)
(
chmod +x "/usr/local/bin/kubemqctl"
)
echo "kubemqctl was successfully installed 🎉"
echo "Now run:"
echo "kubemqctl # validate that kubemqctl is installed"
echo ""
echo "Looking for more? Visit https://docs.kubemq.io/getting-started/quick-start"
echo ""