Skip to content

Instantly share code, notes, and snippets.

@rudaoshi
Forked from lotreal/install-vagrant-vbguest.sh
Last active December 20, 2015 13:08
Show Gist options
  • Save rudaoshi/946bc2a1d659969211d6 to your computer and use it in GitHub Desktop.
Save rudaoshi/946bc2a1d659969211d6 to your computer and use it in GitHub Desktop.
解决中国局域网中 vagrant plugin install vagrant-vbguest 出错的问题
#!/usr/bin/env bash
GEMS=$(cat <<EOF
childprocess-0.5.8.gem
ffi-1.9.10.gem
little-plugger-1.1.4.gem
micromachine-1.1.0.gem
multi_json-1.11.1.gem
net-ssh-2.9.2.gem
rest-client-1.6.9.gem
vagrant-vbguest-0.11.0.gem
EOF
)
CACHE=$HOME/.vagrant.d/gems/cache
mkdir -p $CACHE
for GEM in $GEMS
do
URL=https://ruby.taobao.org/gems/$GEM
echo "Downloading: $URL"
wget -O $CACHE/$GEM $URL
done
vagrant plugin install vagrant-vbguest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment