Created
November 8, 2012 04:08
-
-
Save jcartledge/4036723 to your computer and use it in GitHub Desktop.
Just the part of ievms that downloads the VPC images
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 | |
# Hacked out of https://github.com/xdissent/ievms/blob/master/ievms.sh | |
set -o nounset | |
set -o errtrace | |
set -o errexit | |
set -o pipefail | |
curl_opts=${CURL_OPTS:-""} | |
log() { printf "$*\n" ; return $? ; } | |
fail() { log "\nERROR: $*\n" ; exit 1 ; } | |
case $1 in | |
6) | |
urls="http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_XP_IE6.exe" | |
;; | |
7) | |
urls=`echo http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_Vista_IE7.part0{1.exe,2.rar,3.rar,4.rar,5.rar,6.rar}` | |
;; | |
8) | |
urls=`echo http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_7_IE8.part0{1.exe,2.rar,3.rar,4.rar}` | |
;; | |
9) | |
urls=`echo http://download.microsoft.com/download/B/7/2/B72085AE-0F04-4C6F-9182-BF1EE90F5273/Windows_7_IE9.part0{1.exe,2.rar,3.rar,4.rar,5.rar,6.rar,7.rar}` | |
;; | |
*) | |
fail "Invalid IE version: ${1}" | |
;; | |
esac | |
for url in $urls; do | |
log "Downloading VHD from ${url}" | |
if ! curl ${curl_opts} -C - -L -O "${url}"; then | |
fail "Failed to download ${url} to ${vhd_path}/ using 'curl', error code ($?)" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is handy for VMWare Fusion which can import theVirtualPC .exes directly.