diff --git a/README.md b/README.md index e4f5db2..74fd0e2 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,10 @@ It is essentially a wrapper around `rsync`. Additionally it will maintain an arc ## Installation -The easiest way to install `soyuz-cli` is using the install script: +The easiest way to install `soyuz-cli` is using the install script. If you are using MacOS, run this command in `Terminal`: ```sh curl https://hugh.run/install-soyuz | bash -``` \ No newline at end of file +``` + +Alternatively, you can build from source if you have rust and cargo installed. \ No newline at end of file diff --git a/install.sh b/install.sh index 395a6f2..a3c4e9e 100755 --- a/install.sh +++ b/install.sh @@ -1,10 +1,14 @@ #!/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/latest/MacOS > /usr/local/bin/soyuz +curl -L https://github.com/hughrun/soyuz-cli/releases/download/$version/MacOS > /usr/local/bin/soyuz # make it executable -chmod +x /usr/local/bin/yawp_test +chmod +x /usr/local/bin/soyuz cat 1>&2 << 'EOM'