Class: RocketFuel::Fix::CommandLineTools::Install
- Inherits:
-
Object
- Object
- RocketFuel::Fix::CommandLineTools::Install
- Defined in:
- lib/rocket_fuel/fix/command_line_tools/install.rb
Instance Method Summary collapse
-
#initialize(dmg_path) ⇒ Install
constructor
A new instance of Install.
- #run ⇒ Object
Constructor Details
#initialize(dmg_path) ⇒ Install
Returns a new instance of Install.
7 8 9 10 |
# File 'lib/rocket_fuel/fix/command_line_tools/install.rb', line 7 def initialize(dmg_path) @dmg_path = dmg_path = DmgMetadata.new(dmg_path) end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rocket_fuel/fix/command_line_tools/install.rb', line 12 def run #sudo before the work needs to be done to improve clarity of prompt `sudo echo ` `echo Y | PAGER=true hdiutil attach '#{@dmg_path}' -quiet ` `sudo installer -pkg '/Volumes/#{volumes_dir}/#{pkg_name}.pkg' -target /` `hdiutil detach '/Volumes/#{volumes_dir}' || hdiutil detach '/Volumes/#{volume_dir}' -force` end |