-
Notifications
You must be signed in to change notification settings - Fork 108
/
install.sh
91 lines (76 loc) · 3.5 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
#!/bin/bash
if test -z "$BASH_VERSION"; then
echo "Please run this script using bash, not sh or any other shell." >&2
exit 1
fi
install() {
set -euo pipefail
dst_dir="${K14SIO_INSTALL_BIN_DIR:-/usr/local/bin}"
if [ -x "$(command -v wget)" ]; then
dl_bin="wget -nv -O-"
else
dl_bin="curl -s -L"
fi
shasum -v 1>/dev/null 2>&1 || (echo "Missing shasum binary" && exit 1)
ytt_version=v0.34.0
kbld_version=v0.30.0
kapp_version=v0.37.0
kwt_version=v0.0.6
imgpkg_version=v0.11.0
vendir_version=v0.16.0
if [[ `uname` == Darwin ]]; then
binary_type=darwin-amd64
ytt_checksum=a874395924e670f2c89160efeffc35b94a9bcf4e515e49935cb1ceb22be7f08a
kbld_checksum=73274d02b0c2837d897c463f820f2c8192e8c3f63fd90c526de5f23d4c6bdec4
kapp_checksum=da6411b79c66138cd7437beb268675edf2df3c0a4a8be07fb140dd4ebde758c1
kwt_checksum=555d50d5bed601c2e91f7444b3f44fdc424d721d7da72955725a97f3860e2517
imgpkg_checksum=e5a3a4dafdc541489279335914f28d2bfa8a2b8de975b78f14b1fce2aee6b95f
vendir_checksum=3e6af7ae5cd89579f6d153af6b6a4c0ab1cfcac22f5014b983d1d942feb8bab0
else
binary_type=linux-amd64
ytt_checksum=49741ac5540fc64da8566f3d1c9538f4f0fec22c62b8ba83e5e3d8efb91ee170
kbld_checksum=76c5c572e7a9095256b4c3ae2e076c370ef70ce9ff4eb138662f56828889a00c
kapp_checksum=f845233deb6c87feac7c82d9b3f5e03ced9a4672abb1a14d4e5b74fe53bc4538
kwt_checksum=92a1f18be6a8dca15b7537f4cc666713b556630c20c9246b335931a9379196a0
imgpkg_checksum=266b877b423cf78bed0fca6e1c310480bee56e9b8f77d018248d80d9e2e83794
vendir_checksum=05cede475c2b947772a9fe552380927054d48158959c530122a150a93bf542dd
fi
echo "Installing ${binary_type} binaries..."
echo "Installing ytt..."
$dl_bin https://github.com/vmware-tanzu/carvel-ytt/releases/download/${ytt_version}/ytt-${binary_type} > /tmp/ytt
echo "${ytt_checksum} /tmp/ytt" | shasum -c -
mv /tmp/ytt ${dst_dir}/ytt
chmod +x ${dst_dir}/ytt
echo "Installed ${dst_dir}/ytt ${ytt_version}"
echo "Installing kbld..."
$dl_bin https://github.com/vmware-tanzu/carvel-kbld/releases/download/${kbld_version}/kbld-${binary_type} > /tmp/kbld
echo "${kbld_checksum} /tmp/kbld" | shasum -c -
mv /tmp/kbld ${dst_dir}/kbld
chmod +x ${dst_dir}/kbld
echo "Installed ${dst_dir}/kbld ${kbld_version}"
echo "Installing kapp..."
$dl_bin https://github.com/vmware-tanzu/carvel-kapp/releases/download/${kapp_version}/kapp-${binary_type} > /tmp/kapp
echo "${kapp_checksum} /tmp/kapp" | shasum -c -
mv /tmp/kapp ${dst_dir}/kapp
chmod +x ${dst_dir}/kapp
echo "Installed ${dst_dir}/kapp ${kapp_version}"
echo "Installing kwt..."
$dl_bin https://github.com/vmware-tanzu/carvel-kwt/releases/download/${kwt_version}/kwt-${binary_type} > /tmp/kwt
echo "${kwt_checksum} /tmp/kwt" | shasum -c -
mv /tmp/kwt ${dst_dir}/kwt
chmod +x ${dst_dir}/kwt
echo "Installed ${dst_dir}/kwt ${kwt_version}"
echo "Installing imgpkg..."
$dl_bin https://github.com/vmware-tanzu/carvel-imgpkg/releases/download/${imgpkg_version}/imgpkg-${binary_type} > /tmp/imgpkg
echo "${imgpkg_checksum} /tmp/imgpkg" | shasum -c -
mv /tmp/imgpkg ${dst_dir}/imgpkg
chmod +x ${dst_dir}/imgpkg
echo "Installed ${dst_dir}/imgpkg ${imgpkg_version}"
echo "Installing vendir..."
$dl_bin https://github.com/vmware-tanzu/carvel-vendir/releases/download/${vendir_version}/vendir-${binary_type} > /tmp/vendir
echo "${vendir_checksum} /tmp/vendir" | shasum -c -
mv /tmp/vendir ${dst_dir}/vendir
chmod +x ${dst_dir}/vendir
echo "Installed ${dst_dir}/vendir ${vendir_version}"
}
install