X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.common;h=5d496032daaae4b723080fd1a36aaf5e392b1bb8;hb=6b38a7067a2843066cd851c621a88790874b09fd;hp=c887f3a0c4d64b6fc5d2f70cd289d0f1f19919ac;hpb=a6bb994a4ac2c3f487cb7b033ed92bac82abf14c;p=build.git diff --git a/build.common b/build.common index c887f3a0..5d496032 100644 --- a/build.common +++ b/build.common @@ -7,7 +7,7 @@ # Copyright (C) 2007 The Trustees of Princeton University # Thierry Parmentelat INRIA # -# supported distros f8, f10, f12, f14, f16, centos5, sl6 +# supported distros f8, f12, f14, f16, f18, centos5, sl6 # # for locating pkgs.py export PATH=.:$PATH @@ -17,10 +17,17 @@ function pl_getDistro() { if [ -f "/etc/redhat-release" ] ; then distro=$(awk ' { print $1 } ' /etc/redhat-release) case $distro in Scientific*) distro="SL" ; esac - else - echo "build.common.pl_getDistro-unknown" - exit 1 + elif [ -f /etc/lsb-release ] ; then + . /etc/lsb-release + echo $DISTRIB_CODENAME + elif [ -f /etc/debian_version ] ; then + case $(cat /etc/debian_version) in + 6.0.6) distro=squeeze ;; + 7.0) distro=wheezy ;; + *) distro=unknown.debian.in.build.common ;; + esac fi + [ -z "$distro" ] && { echo "build.common.pl_getDistro-unknown"; exit 1; } echo "$distro" return 0 } @@ -56,6 +63,9 @@ function pl_getReleaseName () { [Ss]L*) releasename=sl$release ;; + squeeze|wheezy|oneiric|precise|quantal|raring) + releasename=$distro + ;; *) releasename="unknown-name-for-${pl_DISTRO}-please-edit-build.common" echo 1>&2 "build.common: WARNING - releasename not set for distro=$distro"