Last active
October 6, 2023 10:26
-
-
Save lotreal/1e16a3fe24191ec86137 to your computer and use it in GitHub Desktop.
解决中国局域网中 vagrant plugin install vagrant-vbguest 出错的问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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://gems.ruby-china.com/$GEM | |
echo "Downloading: $URL" | |
curl --progress-bar -o $CACHE/$GEM -L $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
你好,已经几年,依赖包的版本号估计需要手动改一下。另外,脚本没有在 Windows 环境下测试过。