Skip to content

Commit

Permalink
publish-release: Simplify check for musl
Browse files Browse the repository at this point in the history
glibc's libc.so path name doesn't necessarily contain the "gnu" string.
We could execute the libc.so file and check the output (this is
supported by both glibc and musl). But let's keep it simple and see how
far we get by blindly assuming glibc if the ldd output doesn't contain
the "musl" string.
  • Loading branch information
weiss committed Sep 30, 2023
1 parent 6a93273 commit 4750ea6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/publish-release
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ cat >"$web_root_dir/install" <<-EOF
Linux/x86_64) arch='x64' ;;
*) unsupported "\$platform" ;;
esac
ldd_output=\$(ldd '/bin/ls' | grep 'libc')
case \$ldd_output in
*musl*) libc='musl' ;;
*gnu*) libc='glibc' ;;
*) unsupported 'non-glibc/musl' ;;
esac
if ldd '/bin/ls' | grep 'libc' | grep -q 'musl'
then libc='musl'
else libc='glibc'
fi
installer="\$rel_name-\$rel_vsn-\$os-\$libc-\$arch.run"
url="https://\$domain/\$installer"
cd "\$tmp_dir"
Expand Down

0 comments on commit 4750ea6

Please sign in to comment.