From aaa3d0a3c38f79b8f8062d5e1cdf48a115ad714d Mon Sep 17 00:00:00 2001
From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= <caglar@verivue.com>
Date: Tue, 8 Mar 2011 17:30:53 -0500
Subject: [PATCH] remove Redhat support while introducing Scientific Linux

---
 build.common | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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" 
-- 
2.47.0