Skip to content

Commit

Permalink
Merge pull request #6 from uitml/update-install-script
Browse files Browse the repository at this point in the history
Update install script to target Go releases
  • Loading branch information
thomasjo authored Jul 20, 2020
2 parents dd49676 + 27d5901 commit 10dfc93
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions docs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
set -eu
umask 077

kernel="$(uname -s | tr '[:upper:]' '[:lower:]')"
case "${kernel}" in
linux*) os="linux" ;;
darwin*) os="macos" ;;
*) echo "unknown kernel" && exit 1 ;;
esac

api_url="https://raw.githubusercontent.com/uitml/frink/legacy"
version="$(curl -s https://api.github.com/repos/uitml/frink/releases/latest | grep "\"name\": \"v.*\"" | cut -d '"' -f 4)"
download_url="https://github.com/uitml/frink/releases/download/${version}/frink-${os}"

echo ${download_url}

mkdir -p /tmp/frink && cd /tmp/frink
curl -LO "${api_url}/bin/kubectl-job-kill"
curl -LO "${api_url}/bin/kubectl-job-list"
curl -LO "${api_url}/bin/kubectl-job-run"
curl -LO "${api_url}/bin/kubectl-job-watch"
sudo cp kubectl* /usr/local/bin/
sudo chmod 755 /usr/local/bin/kubectl-job-*
cd "$(mktemp -d -t frink-XXXX)"
curl -LO "${download_url}"
sudo cp frink* /usr/local/bin/frink
sudo chmod 755 /usr/local/bin/frink

0 comments on commit 10dfc93

Please sign in to comment.