Use uname -s for install script compatibility with outdated macOS GNU utils (#1123)

This commit is contained in:
Zanie Adkins 2023-06-04 14:32:41 -05:00 committed by GitHub
parent 22b3419fce
commit f0a62754ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,12 +6,12 @@ cd "$(mktemp -d)"
base_url="https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-"
os="$(uname -o)"
os="$(uname -s)"
if [ "$os" == "Darwin" ]; then
url="${base_url}universal-apple-darwin.zip"
curl -LO --proto '=https' --tlsv1.2 -sSf "$url"
unzip cargo-binstall-universal-apple-darwin.zip
elif [ "$os" == "GNU/Linux" ]; then
elif [ "$os" == "Linux" ]; then
machine="$(uname -m)"
target="${machine}-unknown-linux-musl"
if [ "$machine" == "armv7" ]; then