X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.common;h=390b6f3420624a8e62b5d40dbb16e7e87caa7091;hb=79261fdae6b6ec2bd157628bd048c8eb1e954c84;hp=dc8bb386093d50f30203e2e60acb40476057ba34;hpb=a1acbc0eda5e3b8fc20a8def8db4e083b90bdacb;p=build.git diff --git a/build.common b/build.common index dc8bb386..390b6f34 100644 --- a/build.common +++ b/build.common @@ -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