2019-02-08 15:51:32 -06:00
|
|
|
#!/bin/bash -e
|
2015-09-22 14:46:01 +01:00
|
|
|
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
|
|
|
|
# by default.
|
|
|
|
|
2016-07-18 09:49:57 -07:00
|
|
|
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython')
|
2015-09-22 14:46:01 +01:00
|
|
|
|
|
|
|
check_and_install() {
|
|
|
|
pkg="${1}-${2}"
|
|
|
|
if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
|
|
|
|
apt-get -y install ${pkg}
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-11-12 07:58:04 +00:00
|
|
|
PYTHON="python3"
|
2015-09-22 14:46:01 +01:00
|
|
|
|
|
|
|
for dep in ${DEPS[@]}; do
|
|
|
|
check_and_install ${PYTHON} ${dep}
|
|
|
|
done
|
|
|
|
|
|
|
|
exec ./hooks/install.real
|