mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
fix: adhere to 80 column limit
This commit is contained in:
parent
90524934a3
commit
9df37881cb
1 changed files with 7 additions and 3 deletions
|
|
@ -11,14 +11,18 @@ MINIMUM_REQUIRED_GLIBC_VERSION=2.36
|
||||||
# `ldd --version` returns the version of glibc, such as 2.41 with other text.
|
# `ldd --version` returns the version of glibc, such as 2.41 with other text.
|
||||||
# `grep --only-matching "[0-9]\+.[0-9]\+"` returns the (version) numbers.
|
# `grep --only-matching "[0-9]\+.[0-9]\+"` returns the (version) numbers.
|
||||||
# `head --lines=1` only returns the first number (which is the glibc version)
|
# `head --lines=1` only returns the first number (which is the glibc version)
|
||||||
users_glibc_version=$(ldd --version | grep --only-matching "[0-9]\+.[0-9]\+" | head --lines=1)
|
users_glibc_version=$(
|
||||||
|
ldd --version | grep --only-matching "[0-9]\+.[0-9]\+" | head --lines=1
|
||||||
|
)
|
||||||
|
|
||||||
# check if the users glibc is less than the required glibc and abort if true.
|
# check if the users glibc is less than the required glibc and abort if true.
|
||||||
# bash doesn't do floating point comparisons. But integer comparisons do work.
|
# bash doesn't do floating point comparisons. But integer comparisons do work.
|
||||||
# Thus, `$(echo $variable | sed "s/\.//")` is used to get an integer
|
# Thus, `$(echo $variable | sed "s/\.//")` is used to get an integer
|
||||||
# representation of the floating point number (2.36 becomes 236).
|
# representation of the floating point number (2.36 becomes 236).
|
||||||
if [ $(echo $users_glibc_version | sed "s/\.//") -lt $(echo $MINIMUM_REQUIRED_GLIBC_VERSION | sed "s/\.//") ]; then
|
if [ $(echo $users_glibc_version | sed "s/\.//") -lt \
|
||||||
echo "Error: Your glibc version is $users_glibc_version but $MINIMUM_REQUIRED_GLIBC_VERSION is required. Aborting."
|
$(echo $MINIMUM_REQUIRED_GLIBC_VERSION | sed "s/\.//") ]; then
|
||||||
|
echo "Error: Your glibc version is $users_glibc_version but" \
|
||||||
|
"$MINIMUM_REQUIRED_GLIBC_VERSION is required. Aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue