代码拉取完成,页面将自动刷新
# -*- 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。