diff --git a/debian/util.sh b/debian/util.sh index 052762b91c..4a5214a9bb 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -357,6 +357,16 @@ build_debs () { echo ${dsc%.dsc}_${arch}.changes } +default_distros () { + local host_distro="Debian" + test -z "$(which lsb_release)" || host_distro="$(lsb_release -is)" + case "$host_distro" in + Debian) echo "sid jessie wheezy" ;; + Ubuntu) echo "utopic trusty" ;; + *) err "Unknown distribution" ;; + esac +} + build_all () { local OPTIND OPTARG local orig_opts="" dsc_opts="" deb_opts="" modlist="" @@ -385,25 +395,7 @@ build_all () { done shift $(($OPTIND-1)) [ -n "$archs" ] || archs="amd64 i386" - if [ -z "$distros" ]; then - local default_distros="sid jessie wheezy" - if [ -z "$(which lsb_release)" ]; then - distros="$default_distros" - else - case "$(lsb_release -is)" in - Debian) - distros="$default_distros" - ;; - Ubuntu) - distros="utopic trusty" - ;; - *) - echo "Unknown distribution" - exit -1 - ;; - esac - fi - fi + [ -n "$distros" ] || distros="$(default_distros)" ! $depinst || aptitude install -y \ rsync git less cowbuilder ccache \ devscripts equivs build-essential