package.bash: RHEL: strip brackets

We now convert "CentOS release 5.11 (Final)"
to             "CentOS_release_5.11_Final"

https://github.com/rfjakob/gocryptfs/issues/113
This commit is contained in:
Jakob Unterwurzacher 2017-05-29 08:40:55 +02:00
parent d59e7da6a6
commit 4d2cc551cf

View File

@ -12,7 +12,8 @@ if [[ -e /etc/os-release ]]; then
source /etc/os-release
elif [[ -e /etc/redhat-release ]]; then
# RHEL and CentOS
ID=$(cat /etc/redhat-release | tr ' ' '_')
# "CentOS release 5.11 (Final)" -> "CentOS_release_5.11_Final"
ID=$(cat /etc/redhat-release | tr ' ' '_' | tr -d '()')
VERSION_ID=""
else
echo "Could not get distribution version"