Method: Geoffrey::Package#install

Defined in:
lib/geoffrey/package.rb

#installObject

Does the actual installing of the package For .pkg files it executes installer. For .app files it just moves it to /Applications – TODO maybe add more customization options TODO investigate other possible extensions.



119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/geoffrey/package.rb', line 119

def install
  return unless should_install

  case File.extname file_to_install
  when ".pkg"
    echo "Installing package"
    execute "installer -pkg #{file_to_install} -target /"
  when ".app"
    echo "Moving file to /Applications"
    FileUtils.mv file_to_install, "/Applications"
  end
  echo "Install successful"
end