Skip to content

Instantly share code, notes, and snippets.

@bkmeneguello
Created May 20, 2020 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkmeneguello/900deba8bc7bfee85cfe1acbe27df87c to your computer and use it in GitHub Desktop.
Save bkmeneguello/900deba8bc7bfee85cfe1acbe27df87c to your computer and use it in GitHub Desktop.
#!/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