From a7d9a55024a09b04518e31f4b2e917df728a51cd Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Tue, 11 Feb 2014 14:01:59 +0100 Subject: [PATCH] Refactor the Ubuntu-script --- vagrantSandbox/README | 8 ++++++- vagrantSandbox/initUbunutuScript.sh | 33 +++++++++++------------------ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 29045362f..41d8b0f16 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -47,8 +47,14 @@ compiling Foam Some machines (read: the BSD-boxes) need the =VirtualBox Extension Pack= installed (because they have USB 2.0) -* Scripts +* Scripts in the machine In the home directory these scripts are found - bootstrapFoam.sh :: A script whose aim it is to compile Foam and the ThirdParty-packages in one go (no paraview and QT). If this works the box is considered operational +* Provisioning scripts + Every "family" of machines has a specific script that makes sure + that the software packages necessary to compile =Foam= are installed + into the machine. In the end these scripts should call + =initGeneralScript.sh= which gets the sources into the machine. It + needs =git=, =mercurial= and =ccache= for that. diff --git a/vagrantSandbox/initUbunutuScript.sh b/vagrantSandbox/initUbunutuScript.sh index ea3de7bf2..d883e1df5 100755 --- a/vagrantSandbox/initUbunutuScript.sh +++ b/vagrantSandbox/initUbunutuScript.sh @@ -24,22 +24,16 @@ echo echo "Installing additional packages" echo -apt-get -y install mercurial -apt-get -y install bison -apt-get -y install flex -apt-get -y install g++ -apt-get -y install make -#apt-get -y install python-dev -apt-get -y install ccache -apt-get -y install cmake +neededPackages=(g++ bison flex mercurial git make ccache cmake rpm) +bonusPackages=(emacs csh tcsh zsh) -# test scripts with different shells -apt-get -y install csh -apt-get -y install tcsh -apt-get -y install zsh +for p in ${neededPackages[@]}; do + apt-get -y install $p +done -# to make the ThirdParty-Stuff work -apt-get -y install rpm +for p in ${bonusPackages[@]}; do + apt-get -y install $p +done # this is needed for the packaging stuff echo @@ -59,13 +53,10 @@ echo echo "Tools for packaging" echo -# Needed for packaging -apt-get -y install default-mta -apt-get -y install dpkg-dev -apt-get -y install debhelper devscripts cdbs - -# Not needed. Just to keep Bernhard happy -apt-get -y install emacs +packagingPackages=(default-mta dpkg-dev debhelper devscripts cdbs binutils-dev) +for p in ${packagingPackages[@]}; do + apt-get -y install $p +done echo echo "Ubuntu-specific ended. Now doing general stuff"