~roadmr/canonical-identity-provider/dont-clobber-saml-attribute-email

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# Do all the necessary magic to prepare and bootstrap the container

# Barf if not uid 0
if [ $(id -u) -ne "0" ]; then
   echo "Please run me with sudo"
   exit
fi
# Barf if not in container, to avoid hosing user's system
# Note this needs to be run as root (but at this point we should be under
# sudo anyway).
if ! grep -qa container=lxc /proc/1/environ; then
    echo "You're not in an LXC container, so I'm refusing to run."
    exit
fi

# Let's make sure your system is up to date
apt-get update
apt-get upgrade -y --force-yes
# If your host system is not in English, need to fix the locale for
# the lxc, as the project (and its tests) assume an English machine.
sed -i 's/LANG=.*/LANG="en_US.UTF-8"/' /etc/default/locale
# Install software-properties-common for easy addition of PPA
apt-get install -y software-properties-common
# Add PPA containing codetree
apt-add-repository --yes ppa:mojo-maintainers
apt update 
# Install apt dependencies
cat dependencies.txt dependencies-devel.txt | xargs apt-get install -y --no-install-recommends
echo All done, now you can do
echo make bootstrap
echo make run / make test