2
# Do all the necessary magic to prepare and bootstrap the container
5
if [ $(id -u) -ne "0" ]; then
6
echo "Please run me with sudo"
9
# Barf if not in container, to avoid hosing user's system
10
# Note this needs to be run as root (but at this point we should be under
12
if ! grep -qa container=lxc /proc/1/environ; then
13
echo "You're not in an LXC container, so I'm refusing to run."
17
# Let's make sure your system is up to date
19
apt-get upgrade -y --force-yes
20
# If your host system is not in English, need to fix the locale for
21
# the lxc, as the project (and its tests) assume an English machine.
22
sed -i 's/LANG=.*/LANG="en_US.UTF-8"/' /etc/default/locale
23
# Install software-properties-common for easy addition of PPA
24
apt-get install -y software-properties-common
25
# Add PPA containing codetree
26
apt-add-repository --yes ppa:mojo-maintainers
27
# Add PPA containing libsodium
28
add-apt-repository --yes ppa:facundo/salty
30
# Install apt dependencies
31
cat dependencies.txt dependencies-devel.txt | xargs apt-get install -y --no-install-recommends
32
echo All done, now you can do
34
echo make run / make test