~codersquid/charms/precise/python-django/fix-test-branches

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e
# Needs to be run as a user who can sudo.  d'oh!
# It will ask your password a lot.

# Install add-apt-repository (packaging differs across releases).
lsb_release -r | grep -q 12.04 \
    && sudo apt-get -y install python-software-properties \
    || sudo apt-get -y install software-properties-common

# Add the juju stable ppa, install charm-tools (juju-test plugin) and other deps
sudo add-apt-repository -y ppa:juju/stable
sudo apt-get update
sudo apt-get -y install juju-deployer juju-core charm-tools python3 python3-yaml python-flake8

# python3-flake8 was introduced after 12.04. Releases prior to that are not
# supported.
lsb_release -r | grep -q 12.04 || sudo apt-get -y install python3-flake8