mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-09 14:20:29 +00:00
rustc-independent musl detection, take 2
This commit is contained in:
13
main.sh
13
main.sh
@@ -169,6 +169,15 @@ if [[ -n "${tool}" ]]; then
|
|||||||
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool},"
|
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool},"
|
||||||
fi
|
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 || true) | grep -q 'musl'; then
|
||||||
|
host_env="musl"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
exe=""
|
exe=""
|
||||||
case "${OSTYPE}" in
|
case "${OSTYPE}" in
|
||||||
cygwin* | msys*) exe=".exe" ;;
|
cygwin* | msys*) exe=".exe" ;;
|
||||||
@@ -309,8 +318,8 @@ for tool in "${tools[@]}"; do
|
|||||||
case "${OSTYPE}" in
|
case "${OSTYPE}" in
|
||||||
linux*)
|
linux*)
|
||||||
host_triple
|
host_triple
|
||||||
case "${host}" in
|
case "${host_env}" in
|
||||||
*-linux-gnu*) url="https://get.nexte.st/${version}/linux" ;;
|
gnu) url="https://get.nexte.st/${version}/linux" ;;
|
||||||
*) url="https://get.nexte.st/${version}/linux-musl" ;;
|
*) url="https://get.nexte.st/${version}/linux-musl" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user