build: make centos6 happy

This commit is contained in:
Zaiming (Stone) Shi 2022-04-08 14:26:03 +02:00
parent beb5b5fada
commit d205cb6fc0
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')"