From 901a464e863db5a992841f84217c89a373b3c0c2 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 18 Jan 2013 08:44:22 +0100 Subject: [PATCH] fix the way debian distros are sensed, for squeeze that does dot have /etc/os-release --- build.common | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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" -- 2.47.0