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 <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-09-29 01:40:01 +00:00
parent 7f6337b1c7
commit 252d3f65ab
1 changed files with 16 additions and 1 deletions

View File

@ -321,7 +321,22 @@ debian_installdeps() {
;;
esac
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