cmd/vendor-install.sh: fail for old Glibc

This commit is contained in:
Maxim Belkin 2020-12-14 16:49:52 -06:00
parent 34b9fe1338
commit 40cd44a45f
No known key found for this signature in database
GPG Key ID: AC71560D4C5F2338

View File

@ -32,6 +32,24 @@ then
esac esac
fi fi
if [[ -n "$HOMEBREW_LINUX" ]]
then
LDD_VERSION_OUTPUT=$(/usr/bin/ldd --version)
if [[ $LDD_VERSION_OUTPUT =~ \ [0-9]\.[0-9]+ ]]
then
LDD_VERSION=${BASH_REMATCH[0]}
LDD_VERSION_MAJOR=${LDD_VERSION%.*}
LDD_VERSION_MINOR=${LDD_VERSION#*.}
if (( LDD_VERSION_MAJOR < 2 || LDD_VERSION_MINOR < 13 ))
then
odie "Vendored tools require system Glibc 2.13 or later"
fi
else
odie "Failed to detect system Glibc version"
fi
unset LDD_VERSION_OUTPUT LDD_VERSION LDD_VERSION_MAJOR LDD_VERSION_MINOR
fi
# Execute the specified command, and suppress stderr unless HOMEBREW_STDERR is set. # Execute the specified command, and suppress stderr unless HOMEBREW_STDERR is set.
quiet_stderr() { quiet_stderr() {
if [[ -z "$HOMEBREW_STDERR" ]]; then if [[ -z "$HOMEBREW_STDERR" ]]; then