From bc8b74b7f614d2f9743a8ca3618fa63569f25cfb Mon Sep 17 00:00:00 2001 From: Josh Hagins Date: Sat, 10 Oct 2015 23:05:31 -0400 Subject: [PATCH] DiffMerge: Use pkg installer Also add a file to the zap :delete stanza, and further DRY up the url stanza. --- Casks/diffmerge.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Casks/diffmerge.rb b/Casks/diffmerge.rb index 3cc7d72e6b57..f4f06551be8c 100644 --- a/Casks/diffmerge.rb +++ b/Casks/diffmerge.rb @@ -1,19 +1,21 @@ cask :v1 => 'diffmerge' do version '4.2.0.697' - sha256 '2c6368653af2440bb4460aef9bb1b2b5d8b84b5a3f47994c4abafc4d7ddbff9e' + sha256 '681b43b6ba5750934143798ee6876cde1ffe63db0fd8eae692dd75a59ceb26cf' - url "http://download-us.sourcegear.com/DiffMerge/4.2.0/DiffMerge.#{version}.intel.stable.dmg" + url "http://download-us.sourcegear.com/DiffMerge/#{version.sub(/\.\d+$/, '')}/DiffMerge.#{version}.intel.stable.pkg" name 'DiffMerge' homepage 'https://www.sourcegear.com/diffmerge' license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder - app 'DiffMerge.app' - binary 'DiffMerge.app/Contents/MacOS/DiffMerge', :target => 'diffmerge' + pkg "DiffMerge.#{version}.intel.stable.pkg" - zap :delete => [ - '~/Library/Preferences/com.sourcegear.DiffMerge.plist', - '~/Library/Preferences/SourceGear DiffMerge Preferences' - ] + uninstall :pkgutil => 'com.sourcegear.DiffMerge' + + zap :delete => [ + '~/Library/Preferences/com.sourcegear.DiffMerge.plist', + '~/Library/Preferences/SourceGear DiffMerge Preferences', + '~/Library/Saved Application State/com.sourcegear.DiffMerge.savedState' + ] caveats <<-EOS.undent Use "diffmerge --nosplash" to hide the splash screen when using