mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 15:54:19 +00:00
Fix message when glibc is not installed
This commit is contained in:
parent
3b90ed90d0
commit
1ef7e0658d
@ -1284,12 +1284,16 @@ download_select_install() {
|
|||||||
# For runners, check GlibC version against runner requirements
|
# For runners, check GlibC version against runner requirements
|
||||||
if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then
|
if [ "$download_type" = "runner" ] && ( [ "$contributor_name" = "/dev/null" ] || [ "$contributor_name" = "TKG" ] ); then
|
||||||
required_glibc="2.33"
|
required_glibc="2.33"
|
||||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
if [ -x "$(command -v ldd)" ]; then
|
||||||
|
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||||
|
else
|
||||||
|
system_glibc="0 (Not installed)"
|
||||||
|
fi
|
||||||
|
|
||||||
# Sort the versions and check if the installed glibc is smaller
|
# Sort the versions and check if the installed glibc is smaller
|
||||||
if [ "$required_glibc" != "$system_glibc" ] &&
|
if [ "$required_glibc" != "$system_glibc" ] &&
|
||||||
[ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
[ "$system_glibc" = "$(printf "$system_glibc\n$required_glibc" | sort -V | head -n1)" ]; then
|
||||||
message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: v$system_glibc\nMinimum required glibc: v$required_glibc"
|
message warning "Your glibc version is incompatible with the selected runner.\n\nSystem glibc: $system_glibc\nMinimum required glibc: $required_glibc"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user