K9S is released very often. It would be nice if release contains a static symbolic link to "latest" release:
For example:
https://github.com/derailed/k9s/releases/download/latest/k9s_latest_Linux_x86_64.tar.gz
would currently point or redirect, download:
https://github.com/derailed/k9s/releases/download/0.12.0/k9s_0.12.0_Linux_x86_64.tar.gz
Maybe helpful for anybody having the same question. For myself i'm doing it like this for now:
#!/bin/bash
# set some variables depending on your system
OUTPUT_PATH=/tmp
OUTPUT_NAME=$OUTPUT_PATH/k9s.tar.gz
BIN_PATH=/home/mralexandernickel/bin
BIN_NAME=k9s
# download, untar, cleanup and move
/usr/bin/curl -s -L $(/usr/bin/curl -s https://api.github.com/repos/derailed/k9s/releases/latest|/usr/bin/jq -r '.assets | map(select(.name | contains("Linux_x86_64"))) | .[0].browser_download_url') -o $OUTPUT_NAME
cd $OUTPUT_PATH
/usr/bin/tar xzf $OUTPUT_NAME
/usr/bin/rm $OUTPUT_NAME
/usr/bin/mv $BIN_NAME $BIN_PATH/$BIN_NAME
...if you want download something else than linux-64bit, you'd need to edit the "contains"-part of jq command.
Most helpful comment
Maybe helpful for anybody having the same question. For myself i'm doing it like this for now:
...if you want download something else than linux-64bit, you'd need to edit the "contains"-part of jq command.