Browse Source

Update adobe-photoshop-lightroom600 - preflight / uninstall_preflight (#3827)

master
commitay 8 years ago
committed by Miccal Matthews
parent
commit
b72a63368b
  1. 16
      Casks/adobe-photoshop-lightroom600.rb

16
Casks/adobe-photoshop-lightroom600.rb

@ -13,8 +13,12 @@ cask 'adobe-photoshop-lightroom600' do
# and https://github.com/caskroom/homebrew-versions/pull/296
preflight do
system_command '/usr/bin/killall',
args: ['-kill', 'SafariNotificationAgent']
processes = system_command '/bin/launchctl', args: ['list']
if processes.stdout.lines.any? { |line| line =~ %r{^\d+\t\d\tcom.apple.SafariNotificationAgent$} }
system_command '/usr/bin/killall', args: ['-kill', 'SafariNotificationAgent']
end
system_command "#{staged_path}/Install.app/Contents/MacOS/Install",
args: [
'--mode=silent', "--deploymentFile=#{staged_path}/deploy/AdobeLightroom6.install.xml"
@ -23,8 +27,12 @@ cask 'adobe-photoshop-lightroom600' do
end
uninstall_preflight do
system_command '/usr/bin/killall',
args: ['-kill', 'SafariNotificationAgent']
processes = system_command '/bin/launchctl', args: ['list']
if processes.stdout.lines.any? { |line| line =~ %r{^\d+\t\d\tcom.apple.SafariNotificationAgent$} }
system_command '/usr/bin/killall', args: ['-kill', 'SafariNotificationAgent']
end
system_command "#{staged_path}/Install.app/Contents/MacOS/Install",
args: [
'--mode=silent', "--deploymentFile=#{staged_path}/deploy/AdobeLightroom6.remove.xml"

Loading…
Cancel
Save