24 Mar
2018
24 Mar
'18
2:06 p.m.
if command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl then libc=musl else libc=glibc fi
which appears to default to musl even if it is not present. But I don't know enough about shell scripting to debug it - could it also be a problem with the shell used? (Mine is zsh.)
Quite possibly the shell makes a difference, but the expression being grepped for really should be protected by quotes. Can you try ldd --version 2>&1 | fgrep -q '^musl' ? Best, Arthur