File: Vagrantfile

package info (click to toggle)
wolfssl 5.8.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 117,604 kB
  • sloc: ansic: 1,584,954; asm: 481,206; sh: 11,586; cs: 6,596; xml: 3,878; perl: 3,291; makefile: 2,058; ada: 1,891; javascript: 748; python: 636; cpp: 131; ruby: 118; objc: 80; tcl: 73
file content (43 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download | duplicates (9)
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
34
35
36
37
38
39
40
41
42
43
# -*- mode: ruby -*-
# vi: set ft=ruby :

$setup = <<SCRIPT


apt-get update
apt-get install -y git autoconf libtool make valgrind libpq-dev


URL=https://github.com/libevent/libevent/releases/download/release
LIB=libevent
VER=2.0.22-stable

wget -q $URL-$VER/$LIB-$VER.tar.gz && tar -zxf $LIB-$VER.tar.gz
cd $LIB-$VER/ && ./autogen.sh && ./configure -q && make -s
sudo make install && cd .. && rm -rf $LIB-$VER*


DST=wolfssl

cp -rp /vagrant/ $DST/
chown -hR vagrant:vagrant $DST/

echo "cd $DST"                                         >> .bashrc
echo "read -p 'Sync $DST? (y/n) ' -n 1 -r"             >> .bashrc
echo "echo # new line"                                 >> .bashrc
echo 'if [[ \$REPLY =~ ^[Yy]$ ]]; then'                >> .bashrc
echo "    echo -e '\e[0;32mRunning $DST sync\e[0m'"    >> .bashrc
echo "    ./pull_to_vagrant.sh"                        >> .bashrc
echo "fi"                                              >> .bashrc


SCRIPT

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.provision "shell", inline: $setup
  config.vm.network "forwarded_port", guest: 11111, host: 33333

end