From c4735dd0f2bf8e3ffafb93cbdadb69fcf219a8ca Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 4 Apr 2026 22:10:53 +0900 Subject: [PATCH] Replace some grep with [[ == ]] --- main.sh | 2 +- tools/ci/tool-list.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.sh b/main.sh index 27f98b68..59221380 100755 --- a/main.sh +++ b/main.sh @@ -443,7 +443,7 @@ case "$(uname -s)" in Linux) host_os=linux ldd_version=$(ldd --version 2>&1 || true) - if grep -Fq musl <<<"${ldd_version}"; then + if [[ "${ldd_version}" == *'musl'* ]]; then host_env=musl else host_env=gnu diff --git a/tools/ci/tool-list.sh b/tools/ci/tool-list.sh index 7174f3bd..239e3779 100755 --- a/tools/ci/tool-list.sh +++ b/tools/ci/tool-list.sh @@ -68,7 +68,7 @@ case "$(uname -s)" in Linux) host_os=linux ldd_version=$(ldd --version 2>&1 || true) - if grep -Fq musl <<<"${ldd_version}"; then + if [[ "${ldd_version}" == *'musl'* ]]; then incompat_tools+=("${musl_incompat[@]}") else host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed "s/.* //g")