soyuz-cli/install.sh

20 lines
587 B
Bash
Raw Normal View History

2023-02-26 17:56:57 +11:00
#!/bin/sh
# This script installs soyuz-cli
2023-02-26 20:49:56 +11:00
# Get the latest version number
url=$(curl $1 -s -L -I -o /dev/null -w '%{url_effective}' https://github.com/hughrun/soyuz-cli/releases/latest)
version=${url##*/} # retain the part after the last slash
2023-02-26 17:56:57 +11:00
# Download latest binary and save in /usr/local/bin
2023-02-26 20:49:56 +11:00
curl -L https://github.com/hughrun/soyuz-cli/releases/download/$version/MacOS > /usr/local/bin/soyuz
2023-02-26 17:56:57 +11:00
# make it executable
2023-02-26 20:49:56 +11:00
chmod +x /usr/local/bin/soyuz
2023-02-26 17:56:57 +11:00
cat 1>&2 << 'EOM'
🚀 soyuz-cli is now installed!
🔧 Get set up with 'soyuz settings'
For help try 'soyuz help'
EOM