branch name changed
[build.git] / build.common
index dc8bb38..390b6f3 100644 (file)
@@ -18,9 +18,7 @@ export PATH=.:$PATH
 function pl_getDistro() {
     if [ -f "/etc/redhat-release" ] ; then
        distro=$(awk ' { print $1 } ' /etc/redhat-release)
-       if [ $distro="Red" ] ; then
-               distro="Redhat"
-       fi
+       case $distro in Red*) distro="Redhat" ; esac
     else
        echo "build.common.pl_getDistro-unknown"
        exit 1
@@ -32,7 +30,7 @@ function pl_getDistro() {
 # returns something like 8, 10, or 5.3
 function pl_getRelease() {
     if [ -f "/etc/redhat-release" ] ; then
-       release=$(awk ' { if ($1=="Fedora" && $2=="Core") print $4 ; if (($1=="Fedora" && $2!="Core")||$1=="CentOS") print $3 ; if ($1=="Redhat") print $6 } ' /etc/redhat-release)
+       release=$(awk ' { if ($1=="Fedora" && $2=="Core") print $4 ; if (($1=="Fedora" && $2!="Core")||$1=="CentOS") print $3 ; if ($1=="Red") print $6 } ' /etc/redhat-release)
     else
        echo "build.common.pl_getRelease-unknown"
        exit 1