2014-08-11 22:27:57 +04:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
$setup = <<SCRIPT
|
2015-01-29 18:17:08 +03:00
|
|
|
|
2014-08-11 22:27:57 +04:00
|
|
|
apt-get update
|
2014-09-05 19:55:57 +04:00
|
|
|
apt-get install -y git autoconf libtool make valgrind libpq-dev
|
2014-08-11 22:27:57 +04:00
|
|
|
|
2015-01-29 18:17:08 +03:00
|
|
|
SRC=vagrant
|
|
|
|
DST=wolfssl
|
|
|
|
|
|
|
|
cp -rp /$SRC/ $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
|
2014-08-11 22:27:57 +04:00
|
|
|
|
2015-01-29 18:17:08 +03:00
|
|
|
cd $DST
|
2014-08-11 22:27:57 +04:00
|
|
|
./autogen.sh
|
|
|
|
./configure
|
|
|
|
make check
|
|
|
|
|
|
|
|
cd ..
|
2015-01-29 18:17:08 +03:00
|
|
|
chown -hR vagrant:vagrant $DST/ /tmp/output
|
2014-08-11 22:27:57 +04:00
|
|
|
|
|
|
|
SCRIPT
|
|
|
|
|
|
|
|
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
config.vm.box = "hashicorp/precise64"
|
|
|
|
config.vm.provision "shell", inline: $setup
|
|
|
|
end
|