detect xenial and act accordingly. lsb-release should be installed to

differentiate between ubuntu versions
This commit is contained in:
Steven Van Acker 2017-02-16 22:43:10 +01:00
parent 7144e756e5
commit c6d1f24c57
7 changed files with 52 additions and 7 deletions

View file

@ -2,4 +2,12 @@
set -eu -o pipefail set -eu -o pipefail
apt-get -y build-dep qemu apt-get -y build-dep qemu
apt-get -y install bison
case "$(lsb_release -cs)" in
xenial)
apt-get -y install bison libtool-bin
;;
*)
apt-get -y install bison
;;
esac

View file

@ -1,4 +1,12 @@
#!/bin/bash -ex #!/bin/bash -ex
set -eu -o pipefail set -eu -o pipefail
apt-get -y install openjdk-7-jre openjdk-7-jdk case "$(lsb_release -cs)" in
xenial)
# need to overwrite because of an ubuntu packaging error(!)
apt-get -y -o Dpkg::Options::="--force-overwrite" install openjdk-9-jre openjdk-9-jdk
;;
*)
apt-get -y install openjdk-7-jre openjdk-7-jdk
;;
esac

View file

@ -52,7 +52,7 @@ function detect_distribution()
function base_build_setup_debian() function base_build_setup_debian()
{ {
PACKAGE_REQS="build-essential libtool g++ gcc texinfo curl wget automake autoconf python python-dev git subversion unzip virtualenvwrapper" PACKAGE_REQS="build-essential libtool g++ gcc texinfo curl wget automake autoconf python python-dev git subversion unzip virtualenvwrapper lsb-release"
PACKAGE_COUNT=$(echo $PACKAGE_REQS | tr ' ' '\n' | wc -l) PACKAGE_COUNT=$(echo $PACKAGE_REQS | tr ' ' '\n' | wc -l)
if [ $(dpkg -l $PACKAGE_REQS | grep "^ii" | wc -l) -ne $PACKAGE_COUNT ] if [ $(dpkg -l $PACKAGE_REQS | grep "^ii" | wc -l) -ne $PACKAGE_COUNT ]
then then

View file

@ -1,4 +1,11 @@
#!/bin/bash -ex #!/bin/bash -ex
set -eu -o pipefail set -eu -o pipefail
apt-get -y install maven libprotobuf-dev openjdk-7-jre openjdk-7-jdk case "$(lsb_release -cs)" in
xenial)
apt-get -o Dpkg::Options::="--force-overwrite" -y install maven libprotobuf-dev openjdk-9-jre openjdk-9-jdk
;;
*)
apt-get -y install maven libprotobuf-dev openjdk-7-jre openjdk-7-jdk
;;
esac

View file

@ -1,4 +1,11 @@
#!/bin/bash -ex #!/bin/bash -ex
set -eu -o pipefail set -eu -o pipefail
apt-get -y install openjdk-7-jre case "$(lsb_release -cs)" in
xenial)
apt-get -o Dpkg::Options::="--force-overwrite" -y install openjdk-9-jre
;;
*)
apt-get -y install openjdk-7-jre
;;
esac

View file

@ -1,4 +1,11 @@
#!/bin/bash -ex #!/bin/bash -ex
set -eu -o pipefail set -eu -o pipefail
apt-get -y install libfuse-dev libpolarssl-dev case "$(lsb_release -cs)" in
xenial)
apt-get -y install gcc cmake make libfuse-dev libmbedtls-dev ruby-dev
;;
*)
apt-get -y install gcc cmake make libfuse-dev libpolarssl-dev ruby-dev
;;
esac

View file

@ -1,4 +1,12 @@
#!/bin/bash -ex #!/bin/bash -ex
set -eu -o pipefail set -eu -o pipefail
apt-get -y install openjdk-7-jre
case "$(lsb_release -cs)" in
xenial)
apt-get -o Dpkg::Options::="--force-overwrite" -y install openjdk-9-jre
;;
*)
apt-get -y install openjdk-7-jre
;;
esac