2
0

Vagrantfile 930 B

12345678910111213141516171819202122232425262728293031323334353637
  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. SRC=vagrant
  7. DST=wolfssl
  8. cp -rp /$SRC/ $DST/
  9. echo "cd $DST" >> .bashrc
  10. echo "read -p 'Sync $DST? (y/n) ' -n 1 -r" >> .bashrc
  11. echo "echo # new line" >> .bashrc
  12. echo 'if [[ \$REPLY =~ ^[Yy]$ ]]; then' >> .bashrc
  13. echo " echo -e '\e[0;32mRunning $DST sync\e[0m'" >> .bashrc
  14. echo " ./pull_to_vagrant.sh" >> .bashrc
  15. echo "fi" >> .bashrc
  16. cd $DST
  17. ./autogen.sh
  18. ./configure
  19. make check
  20. cd ..
  21. chown -hR vagrant:vagrant $DST/ /tmp/output
  22. SCRIPT
  23. VAGRANTFILE_API_VERSION = "2"
  24. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  25. config.vm.box = "hashicorp/precise64"
  26. config.vm.provision "shell", inline: $setup
  27. end