soyuz-cli/install.sh
2023-02-26 20:49:56 +11:00

20 lines
587 B
Bash
Executable file
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# This script installs soyuz-cli
# 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
# Download latest binary and save in /usr/local/bin
curl -L https://github.com/hughrun/soyuz-cli/releases/download/$version/MacOS > /usr/local/bin/soyuz
# make it executable
chmod +x /usr/local/bin/soyuz
cat 1>&2 << 'EOM'
🚀 soyuz-cli is now installed!
🔧 Get set up with 'soyuz settings'
For help try 'soyuz help'
EOM