From: S.Çağlar Onur Date: Tue, 8 Mar 2011 22:30:53 +0000 (-0500) Subject: remove Redhat support while introducing Scientific Linux X-Git-Tag: 5.0-rc21~69^2~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=aaa3d0a3c38f79b8f8062d5e1cdf48a115ad714d;p=build.git remove Redhat support while introducing Scientific Linux --- diff --git a/build.common b/build.common index 1edfdea1..69a46977 100644 --- a/build.common +++ b/build.common @@ -18,7 +18,7 @@ export PATH=.:$PATH function pl_getDistro() { if [ -f "/etc/redhat-release" ] ; then distro=$(awk ' { print $1 } ' /etc/redhat-release) - case $distro in Red*) distro="Redhat" ; esac + case $distro in Scientific*) distro="SL" ; esac else echo "build.common.pl_getDistro-unknown" exit 1 @@ -30,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=="Red") 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=="Scientific") print $4 } ' /etc/redhat-release) else echo "build.common.pl_getRelease-unknown" exit 1 @@ -48,9 +48,6 @@ function pl_getReleaseName () { [Ff]edora*) releasename=f$release ;; - [Re]edhat*) - releasename=rhel6 - ;; [Cc]entOS*) old_IFS="$IFS" IFS="." @@ -58,6 +55,9 @@ function pl_getReleaseName () { IFS="$old_IFS" releasename=centos$1 ;; + [Ss]cientific*) + releasename=sl$release + ;; *) releasename="unknown-name-for-${pl_DISTRO}-please-edit-build.common" echo 1>&2 "build.common: WARNING - releasename not set for distro=$distro"