Merge pull request #7564 from zmstone/0408-4.3-build-make-centos6-happy

build: make centos6 happy
This commit is contained in:
Zaiming (Stone) Shi 2022-04-08 13:28:12 +01:00 committed by GitHub
commit 4390c58ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,9 @@ case "$UNAME" in
if grep -q -i 'rhel' /etc/*-release; then
DIST='centos'
VERSION_ID="$(rpm --eval '%{rhel}')"
elif grep -q -i 'centos' /etc/*-release; then
DIST='centos'
VERSION_ID="$(rpm --eval '%{centos_ver}')"
else
DIST="$(sed -n '/^ID=/p' /etc/os-release | sed -r 's/ID=(.*)/\1/g' | sed 's/"//g')"
VERSION_ID="$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed -r 's/VERSION_ID=(.*)/\1/g' | sed 's/"//g')"