Skip to content

Commit

Permalink
Add vagrant config
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed May 7, 2014
1 parent 903118a commit 01c5aed
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "lucid32"
# config.vm.provision :shell, :path => "scripts/bootstrap-ubuntu.sh"
end
36 changes: 36 additions & 0 deletions scripts/bootstrap-ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh
# Set up build environment on Ubuntu.

set -e

sudo apt-get update

# Install build tools.
sudo apt-get install -y git-core gcc g++ gfortran \
ccache make buildbot default-jdk unixodbc-dev

# Install CMake.
CMAKE=cmake-2.8.12.2-Linux-i386
wget http://www.cmake.org/files/v2.8/$CMAKE.tar.gz
tar xzf $CMAKE.tar.gz
sudo rm -rf /opt/$CMAKE
sudo mv $CMAKE /opt
sudo ln -sf /opt/$CMAKE/bin/cmake /usr/local/bin

# Set up ccache links.
sudo ln -sf /usr/bin/ccache /usr/local/bin/gcc
sudo ln -sf /usr/bin/ccache /usr/local/bin/cc
sudo ln -sf /usr/bin/ccache /usr/local/bin/g++
sudo ln -sf /usr/bin/ccache /usr/local/bin/c++

# Install f90cache.
rm -rf f90cache
git clone https://github.com/vitaut/f90cache.git
cd f90cache
./configure
make
sudo make install
cd ..
rm -rf f90cache
cd /usr/local/bin
sudo ln -sf f90cache gfortran-4.4

0 comments on commit 01c5aed

Please sign in to comment.