From e5d84f2a67fa275307279053b9e63602d31aa831 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 11 Dec 2022 13:48:21 +0900 Subject: [PATCH] Revert "Adjust host env check" This reverts commit 5b5badbee34fc505e303b7afbf0ac9958985a4ae. Fixes #29 --- main.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/main.sh b/main.sh index 14a82b1a..a2f1c5a6 100755 --- a/main.sh +++ b/main.sh @@ -161,16 +161,6 @@ if [[ ! -d "${cargo_bin}" ]]; then cargo_bin=/usr/local/bin fi -# Refs: https://github.com/rust-lang/rustup/blob/HEAD/rustup-init.sh -case "${OSTYPE}" in - linux*) - host_env="gnu" - if ldd --version 2>&1 | grep -q 'musl'; then - host_env="musl" - fi - ;; -esac - for tool in "${tools[@]}"; do if [[ "${tool}" == *"@"* ]]; then version="${tool#*@}" @@ -300,8 +290,9 @@ for tool in "${tools[@]}"; do # https://nexte.st/book/pre-built-binaries.html case "${OSTYPE}" in linux*) - case "${host_env}" in - gnu) url="https://get.nexte.st/${version}/linux" ;; + host_triple + case "${host}" in + *-linux-gnu*) url="https://get.nexte.st/${version}/linux" ;; *) url="https://get.nexte.st/${version}/linux-musl" ;; esac ;;