From 252d3f65abcb606c3786c997a001f067de7cf1ea Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sun, 29 Sep 2019 01:40:01 +0000 Subject: [PATCH] installdeps: detect correct mxe apt repo Try to guess the correct mxe apt package repository based on `lsb_release` codename. Signed-off-by: Rafael Kitover --- installdeps | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/installdeps b/installdeps index 8e1f4f65..2ac6bac8 100755 --- a/installdeps +++ b/installdeps @@ -321,7 +321,22 @@ debian_installdeps() { ;; esac - debian_rel=trusty + debian_rel=$(lsb_release -a 2>/dev/null | sed -En 's/^Codename:[[:space:]]*//p') + + case "$debian_rel" in + bionic|stretch|trusty|xenial) + ;; + buster|cosmic|disco) + debian_rel=bionic + ;; + yakkety|zesty|artful) + debian_rel=xenial + ;; + *) + debian_rel=trusty + ;; + esac + mxe_apt_sources=/etc/apt/sources.list.d/mxeapt.list sudo apt-get -qq -y update