diff options
Diffstat (limited to 'contrail-keystone-auth/hooks/install')
-rwxr-xr-x | contrail-keystone-auth/hooks/install | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrail-keystone-auth/hooks/install b/contrail-keystone-auth/hooks/install new file mode 100755 index 0000000..3c644d3 --- /dev/null +++ b/contrail-keystone-auth/hooks/install @@ -0,0 +1,16 @@ +#!/bin/bash +# Wrapper to deal with newer Ubuntu versions that don't have py2 installed +# by default. + +declare -a DEPS=('python' 'python-yaml' 'python-pip') + +check_and_install() { + pkg="${1}" + if ! dpkg -s ${pkg} 2>&1 > /dev/null; then + apt-get -y install ${pkg} + fi +} + +for dep in ${DEPS[@]}; do + check_and_install ${dep} +done |