homebrew-cask-versions/test/support/Casks/with-pkgutil-uninstall.rb
phinze 171456dc98 support for install/uninstall
accepts a single argument, which is a relative path to a pkg
inside the extracted Cask; homebrew-cask will attempt to install this
pkg after the Cask is extracted via `installer`

because of the many different ways uninstallers work, this
has several features:

 - `:script`: a script in the Cask which serves as an uninstaller (e.g.
   Vagrant, VirtualBox), uses `:args`, and `:input` keys to interact
   with said script
 - `:pkgutil`: a regexp which captures all package_ids installed by this
   cask; homebrew-cask will list all files installed under these ids and
   remove them
 - `:launchctl`: a list of bundle_ids for services that should be
   removed by homebrew-cask
 - `:files`: a fallback list of files to manually remove; helps when
   uninstallers miss something

refs #661
2013-07-21 22:01:38 -05:00

8 lines
267 B
Ruby

class WithPkgutilUninstall < TestCask
url TestHelper.local_binary('MyFancyPkg.zip')
homepage 'http://example.com/fancy-pkg'
version '1.2.3'
sha1 '8588bd8175a54b8e0a1310cc18e6567d520ab7c4'
install 'Fancy.pkg'
uninstall :pkgutil => 'my.fancy.package.*'
end