Created
May 20, 2020 17:37
-
-
Save bkmeneguello/900deba8bc7bfee85cfe1acbe27df87c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if (( EUID != 0 )); then | |
echo "You must be root to do this." 1>&2 | |
exit 1 | |
fi | |
K9S=$(command -v k9s || echo /usr/local/bin/k9s) | |
$K9S version | |
URL=$(curl https://api.github.com/repos/derailed/k9s/releases/latest | jq -r '.assets[].browser_download_url' | grep k9s_$(uname -s)_$(uname -m)) | |
curl -sSL $URL | tar xzOf - k9s | tee $K9S > /dev/null | |
sudo chmod +x $K9S | |
$K9S version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment