From: Thierry Parmentelat Date: Fri, 18 Jan 2013 07:44:22 +0000 (+0100) Subject: fix the way debian distros are sensed, for squeeze that does dot have /etc/os-release X-Git-Tag: 5.2.1~123 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=901a464e863db5a992841f84217c89a373b3c0c2;p=build.git fix the way debian distros are sensed, for squeeze that does dot have /etc/os-release --- diff --git a/build.common b/build.common index c11fd456..228a6ad2 100644 --- a/build.common +++ b/build.common @@ -18,9 +18,11 @@ function pl_getDistro() { distro=$(awk ' { print $1 } ' /etc/redhat-release) case $distro in Scientific*) distro="SL" ; esac elif [ -f /etc/debian_version ] ; then - for known in lenny squeeze wheezy jessie; do - grep -q $known /etc/os-release && distro=$known - done + case $(cat /etc/debian_version) in + 6.0.6) distro=squeeze ;; + 7.0) distro=wheezy ;; + *) distro=unknown.debian.in.ubild.common ;; + esac fi [ -z "$distro" ] && { echo "build.common.pl_getDistro-unknown"; exit 1; } echo "$distro"