#! /bin/bash
boxName=$1
echo
echo "Init script for $boxName"
if [ "$boxName" == "lucid" ]
then
echo "Additional Python-Repository"
# needed for add-appt-repository
apt-get -y install python-software-properties
add-apt-repository ppa:mercurial-ppa/releases
fi
apt-get update -y
echo "Installing additional packages"
neededPackages=(g++ bison flex mercurial git make ccache cmake rpm zlib1g-dev libiberty-dev)
bonusPackages=(emacs csh tcsh zsh)
for p in ${neededPackages[@]}; do
apt-get -y install $p
done
for p in ${bonusPackages[@]}; do
# this is needed for the packaging stuff
echo "Setting for postfix"
# Make sure that default-mta installs
debconf-set-selections <<< "postfix postfix/mailname string vagrant.test.machine.com"
debconf-set-selections <<< "postfix postfix/myhostname string vagrant.test.machine.com"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
debconf-set-selections <<< "postfix postfix/destinations string localhost"
# this workaround doesn't work for lucid
export DEBIAN_FRONTEND=noninteractive
echo "Tools for packaging"
packagingPackages=(default-mta dpkg-dev debhelper devscripts cdbs)
for p in ${packagingPackages[@]}; do
echo "Ubuntu-specific ended. Now doing general stuff"
/vagrant/initGeneralScript.sh
echo "Ended"