diff --git a/bootstrap/_deb_common.sh b/bootstrap/_deb_common.sh new file mode 100755 index 000000000..ccb4c4b2f --- /dev/null +++ b/bootstrap/_deb_common.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# Tested with: +# - Ubuntu: +# - 12.04 (x64, Travis) +# - 14.04 (x64, Vagrant) +# - 14.10 (x64) +# - Debian: +# - 6.0.10 "squeeze" (x64) +# - 7.8 "wheezy" (x64) +# - 8.0 "jessie" (x64) + +# virtualenv binary can be found in different packages depending on +# distro version (#346) +distro=$(lsb_release -si) +# 6.0.10 => 60, 14.04 => 1404 +version=$(lsb_release -sr | awk -F '.' '{print $1 $2}') +if [ "$distro" = "Ubuntu" -a "$version" -ge 1410 ] +then + virtualenv="virtualenv" +elif [ "$distro" = "Debian" -a "$version" -ge 80 ] +then + virtualenv="virtualenv" +else + virtualenv="python-virtualenv" +fi + +# dpkg-dev: dpkg-architecture binary necessary to compile M2Crypto, c.f. +# #276, https://github.com/martinpaljak/M2Crypto/issues/62, +# M2Crypto setup.py:add_multiarch_paths + +sudo apt-get update +sudo apt-get install -y --no-install-recommends \ + python python-setuptools "$virtualenv" python-dev gcc swig \ + dialog libaugeas0 libssl-dev libffi-dev ca-certificates dpkg-dev diff --git a/bootstrap/debian.sh b/bootstrap/debian.sh index f215cf2e0..068a039cb 120000 --- a/bootstrap/debian.sh +++ b/bootstrap/debian.sh @@ -1 +1 @@ -ubuntu.sh \ No newline at end of file +_deb_common.sh \ No newline at end of file diff --git a/bootstrap/ubuntu.sh b/bootstrap/ubuntu.sh deleted file mode 100755 index 18c503e3a..000000000 --- a/bootstrap/ubuntu.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# Tested with: -# - 12.04 (x64, Travis) -# - 14.04 (x64, Vagrant) -# - 14.10 (x64) - -# virtualenv binary can be found in different packages depending on -# distro version (#346) -distro=$(lsb_release -si) -# 6.0.10 => 60, 14.04 => 1404 -version=$(lsb_release -sr | awk -F '.' '{print $1 $2}') -if [ "$distro" = "Ubuntu" -a "$version" -ge 1410 ] -then - virtualenv="virtualenv" -elif [ "$distro" = "Debian" -a "$version" -ge 80 ] -then - virtualenv="virtualenv" -else - virtualenv="python-virtualenv" -fi - -# dpkg-dev: dpkg-architecture binary necessary to compile M2Crypto, c.f. -# #276, https://github.com/martinpaljak/M2Crypto/issues/62, -# M2Crypto setup.py:add_multiarch_paths - -sudo apt-get update -sudo apt-get install -y --no-install-recommends \ - python python-setuptools "$virtualenv" python-dev gcc swig \ - dialog libaugeas0 libssl-dev libffi-dev ca-certificates dpkg-dev diff --git a/bootstrap/ubuntu.sh b/bootstrap/ubuntu.sh new file mode 120000 index 000000000..068a039cb --- /dev/null +++ b/bootstrap/ubuntu.sh @@ -0,0 +1 @@ +_deb_common.sh \ No newline at end of file