Skip to content

Instantly share code, notes, and snippets.

@thewellington
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewellington/ae15abc77fb0a49682de to your computer and use it in GitHub Desktop.
Save thewellington/ae15abc77fb0a49682de to your computer and use it in GitHub Desktop.
Downloads and Installs Win7 and IE 9 - VMware Fusion VM for Macintosh
#!/usr/bin/env bash
#
# v1.0 - 2014-09-18
#
# downloads rar files from modern.ie and extracts them.
#
# INSTRUCTIONS: place this script in your home directory, set the executable bit, and run it.
URL='https://www.modern.ie/vmdownload?platform=mac&virtPlatform=vmware&browserOS=IE9-Win7&parts=4&filename=VMBuild_20131127/VMware/IE9_Win7/Mac/'
RAR_REGEX='IE9.Win7.For.MacVMware.part0{1.sfx,2.rar,3.rar,4.rar}'
download_vm() {
echo "downloading VM"
mkdir -p -v "${HOME}/modernie/"
cd $HOME/modernie/
curl -O -L "${URL}${RAR_REGEX}"
}
extract_vm(){
echo "extracting VM, please stand by..."
chmod +x $HOME/modernie/*.sfx
$HOME/modernie/*.sfx
}
launch_vm() {
echo "starting VM"
open "${HOME}/modernie/IE9 - Win7.vmwarevm"
}
usage() {
echo "Modern IE Downloader"
echo "this script takes a single argument:
--install-vm will download a new VM fromm Modern IE, extract it, and launch it.
--extract-vm will extract a new VM from a previous download and launch it
--launch-vm will launch your VM
"
}
# ok let's get to work
if [ -z "$1" ]; then
usage
elif [ "$1" = "--install-vm" ]; then
download_vm
extract_vm
launch_vm
elif [ "$1" = "--extract-vm" ]; then
extract_vm
launch_vm
elif [ "$1" = "--launch-vm" ]; then
launch_vm
else
usage
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment