diff --git a/Casks/crosspack-avr.rb b/Casks/crosspack-avr.rb new file mode 100644 index 0000000000..eb94d6a1cf --- /dev/null +++ b/Casks/crosspack-avr.rb @@ -0,0 +1,27 @@ +class CrosspackAvr < Cask + url 'http://www.obdev.at/downloads/crosspack/CrossPack-AVR-20131216.dmg' + homepage 'http://www.obdev.at/products/crosspack/' + version 'CrossPack-AVR 20130-12-16' + sha1 'd255e7822e961c002691fbb0d19a564a819c7386' + install 'CrossPack-AVR.pkg' + after_uninstall do + IO.popen('yes | sudo -E /usr/local/CrossPack-AVR/uninstall && sudo pkgutil --forget at.obdev.CrossPack-AVR', 'r+') do |pipe| + pipe.close_write + while line = pipe.gets + puts line + end + end + end + + def caveats + <<-EOS.undent + CrossPack-AVR can normally install multiple versions side-by-side. + Therefore, running install will typically install multiple versions + of the tools in /usr/local/ (e.g. /usr/local/CrossPack-AVR-20131216). + + This cask will invoke the CrossPack-AVR uninstall script when it is + uninstalled, removing the most recent version of the tools. + EOS + end + +end