1
0

Vagrantfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. $setup = <<SCRIPT
  4. apt-get update
  5. apt-get install -y git autoconf libtool make valgrind libpq-dev
  6. URL=https://github.com/libevent/libevent/releases/download/release
  7. LIB=libevent
  8. VER=2.0.22-stable
  9. wget -q $URL-$VER/$LIB-$VER.tar.gz && tar -zxf $LIB-$VER.tar.gz
  10. cd $LIB-$VER/ && ./autogen.sh && ./configure -q && make -s
  11. sudo make install && cd .. && rm -rf $LIB-$VER*
  12. DST=wolfssl
  13. cp -rp /vagrant/ $DST/
  14. chown -hR vagrant:vagrant $DST/
  15. echo "cd $DST" >> .bashrc
  16. echo "read -p 'Sync $DST? (y/n) ' -n 1 -r" >> .bashrc
  17. echo "echo # new line" >> .bashrc
  18. echo 'if [[ \$REPLY =~ ^[Yy]$ ]]; then' >> .bashrc
  19. echo " echo -e '\e[0;32mRunning $DST sync\e[0m'" >> .bashrc
  20. echo " ./pull_to_vagrant.sh" >> .bashrc
  21. echo "fi" >> .bashrc
  22. SCRIPT
  23. VAGRANTFILE_API_VERSION = "2"
  24. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  25. config.vm.box = "ubuntu/trusty64"
  26. config.vm.provision "shell", inline: $setup
  27. config.vm.network "forwarded_port", guest: 11111, host: 33333
  28. end