mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00:00
Replace some grep with [[ == ]]
This commit is contained in:
2
main.sh
2
main.sh
@@ -443,7 +443,7 @@ case "$(uname -s)" in
|
|||||||
Linux)
|
Linux)
|
||||||
host_os=linux
|
host_os=linux
|
||||||
ldd_version=$(ldd --version 2>&1 || true)
|
ldd_version=$(ldd --version 2>&1 || true)
|
||||||
if grep -Fq musl <<<"${ldd_version}"; then
|
if [[ "${ldd_version}" == *'musl'* ]]; then
|
||||||
host_env=musl
|
host_env=musl
|
||||||
else
|
else
|
||||||
host_env=gnu
|
host_env=gnu
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ case "$(uname -s)" in
|
|||||||
Linux)
|
Linux)
|
||||||
host_os=linux
|
host_os=linux
|
||||||
ldd_version=$(ldd --version 2>&1 || true)
|
ldd_version=$(ldd --version 2>&1 || true)
|
||||||
if grep -Fq musl <<<"${ldd_version}"; then
|
if [[ "${ldd_version}" == *'musl'* ]]; then
|
||||||
incompat_tools+=("${musl_incompat[@]}")
|
incompat_tools+=("${musl_incompat[@]}")
|
||||||
else
|
else
|
||||||
host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed "s/.* //g")
|
host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed "s/.* //g")
|
||||||
|
|||||||
Reference in New Issue
Block a user