~james-page/charms/trusty/swift-proxy/trunk

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: James Page
  • Date: 2016-01-19 14:46:01 UTC
  • mfrom: (134.1.1 stable.remote)
  • Revision ID: james.page@ubuntu.com-20160119144601-66bdh4r0va0pn9og
Fix liberty/mitaka typo from previous test definition update batch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
 
3
# by default.
 
4
 
 
5
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml')
 
6
 
 
7
check_and_install() {
 
8
    pkg="${1}-${2}"
 
9
    if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
 
10
        apt-get -y install ${pkg}
 
11
    fi
 
12
}
 
13
 
 
14
PYTHON="python"
 
15
 
 
16
for dep in ${DEPS[@]}; do
 
17
    check_and_install ${PYTHON} ${dep}
 
18
done
 
19
 
 
20
exec ./hooks/install.real