Skip to content

Commit 44b462e

Browse files
committed
Added Vagrant virtual environment configuration
1 parent 02fe6c4 commit 44b462e

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
bin/*
2+
Sample/*
3+
.vagrant
24
osm2pgrouting
35
*.o
46
*~
57
.project
68
.cproject
7-
Sample/*

Vagrantfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
pgbox = ENV['BOX'] || "precise64"
5+
6+
Vagrant.configure("2") do |config|
7+
8+
# Vagrant box configuration
9+
config.vm.box = pgbox
10+
config.vm.box_url = "http://files.vagrantup.com/%s.box" % [pgbox]
11+
12+
# Bootstrap script
13+
config.vm.provision :shell, :path => "tools/vagrant/bootstrap.sh"
14+
15+
# Forward SSH agent to host
16+
config.ssh.forward_agent = true
17+
18+
# Create synced folder for GnuPG keys
19+
config.vm.synced_folder "~/.gnupg", "/home/vagrant/.gnupg"
20+
config.vm.synced_folder "../", "/home/vagrant/repos"
21+
22+
end

tools/vagrant/bootstrap.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# ------------------------------------------------------------------------------
3+
# Vagrant - Virtualized Development
4+
# Copyright(c) pgRouting Contributors
5+
#
6+
# Virtual environment bootstrap script
7+
# ------------------------------------------------------------------------------
8+
9+
set -e # Exit script immediately on first error.
10+
#set -x # Print commands and their arguments as they are executed.
11+
12+
# Abort provisioning if pgRouting development environment already setup.
13+
# ------------------------------------------------------------------------------
14+
which vim >/dev/null &&
15+
{ echo "osm2pgrouting development environment already setup."; exit 0; }
16+
17+
# Run provisioning
18+
# ------------------------------------------------------------------------------
19+
echo "Installing packages ... this may take some time."
20+
apt-get update -qq
21+
apt-get install -y -qq vim packaging-dev checkinstall libboost-graph-dev libpq-dev libexpat1-dev
22+

tools/vagrant/packaging.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# ------------------------------------------------------------------------------
3+
# Vagrant - Virtualized Development
4+
# Copyright(c) pgRouting Contributors
5+
#
6+
# Prepare packaging
7+
# ------------------------------------------------------------------------------
8+
9+
echo "[email protected]" > ~/.bash_aliases
10+
echo "DEBFULLNAME='First Last'" >> ~/.bash_aliases
11+
12+
git config --global user.name "First Last"
13+
git config --global user.email "[email protected]"
14+
git config --global core.editor vim
15+
git config --global color.ui true

0 commit comments

Comments
 (0)