Created
January 31, 2012 10:05
-
-
Save fnordfish/1709724 to your computer and use it in GitHub Desktop.
Educated guess the VBGuest.iso
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
def autodetect_iso! | |
if !@iso_path | |
iso_path = if Vagrant::Util::Platform.linux? | |
"/usr/share/virtualbox/VBoxGuestAdditions.iso" | |
elsif Vagrant::Util::Platform.darwin? | |
"/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso" | |
elsif Vagrant::Util::Platform.windows? | |
"%PROGRAMFILES%/VirtualBox/VBoxGuestAdditions.iso" | |
end | |
if !File.exists?(iso_path) | |
dvd = VirtualBox::DVD.all.find do |d| | |
!!(d.location =~ /VBoxGuestAdditions.iso$/) | |
end | |
iso_path = dvd.location if dvd | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
["/usr/share/...", "/opt/..."]
for linux ?darvin
,*bsd
?