Created
February 9, 2015 14:33
-
-
Save savingschampion/9f4d70d17c3a185ac456 to your computer and use it in GitHub Desktop.
This file contains 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
## Ensure you have vagrant and virtualbox installed on your path. | |
mkdir ~/ie_vms | |
cd ~/ie_vms | |
cat > Vagrantfile <<'EOF' | |
# Usage: IE={box} vagrant up | |
# | |
# Eg. IE=XPIE6 vagrant up | |
boxes = { | |
"XPIE6" => "http://aka.ms/vagrant-xp-ie6", | |
"XPIE8" => "http://aka.ms/vagrant-xp-ie8", | |
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7", | |
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8", | |
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9", | |
"Win7IE10" => "http://aka.ms/vagrant-win7-ie10", | |
"Win7IE11" => "http://aka.ms/vagrant-win7-ie11", | |
"Win8IE10" => "http://aka.ms/vagrant-win8-ie10", | |
"Win8IE11" => "http://aka.ms/vagrant-win8.1-ie11", | |
} | |
unless boxes.has_key? ENV['IE'] | |
abort('Invalid box supplied') | |
end | |
Vagrant.configure("2") do |config| | |
config.vm.box = ENV['IE'] | |
config.vm.box_url = boxes[ ENV['IE'] ] | |
config.vm.guest = :windows | |
config.vm.boot_timeout = 1 | |
config.vm.communicator = "winrm" | |
config.vm.provider "virtualbox" do |vm| | |
vm.gui = true | |
end | |
end | |
EOF | |
# for bash/sh | |
for VM in [ XPIE6, XPIE8, VistaIE7, Win7IE8, Win7IE9, Win7IE10, Win7IE11, Win8IE10, Win8IE11 ]; do | |
# For zsh you need the following line instead | |
# for VM in XPIE6 XPIE8 VistaIE7 Win7IE8 Win7IE9 Win7IE10 Win7IE11 Win8IE10 Win8IE11 ; do | |
echo $VM; IE=$VM vagrant up; IE=$VM vagrant destroy; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment