mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 16:24:21 +00:00
Remove bc dependency
This commit is contained in:
parent
a328b465ef
commit
9909221dff
@ -1148,11 +1148,13 @@ download_select_install() {
|
||||
esac
|
||||
|
||||
# For runners, check GlibC version against runner requirements
|
||||
if [ "download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
||||
if [ "$download_type" = "runner" ] && [ "$contributor_name" = "/dev/null" ]; then
|
||||
required_glibc="2.33"
|
||||
system_glibc="$(ldd --version | awk '/ldd/{print $NF}')"
|
||||
|
||||
if [ "$(bc <<< "$required_glibc > $system_glibc")" = "1" ]; then
|
||||
# Sort the versions and check if the installed glibc is smaller
|
||||
if [ "$required_glibc" != "$system_glibc" ] &&
|
||||
[ "$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"
|
||||
return 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user