2015-12-18 09:15:28 +08:00
|
|
|
cask 'audacity' do
|
2016-06-13 17:59:22 +08:00
|
|
|
version '2.1.2'
|
2016-02-04 23:32:31 +08:00
|
|
|
sha256 '2e4b7d608ecc0d2f79bf16663f085d383075e488f7d50bf7d74c0b69173defe7'
|
2015-09-09 22:04:18 +08:00
|
|
|
|
2016-06-16 05:34:27 +08:00
|
|
|
url do
|
|
|
|
# Audacity does not provide a fixed URL
|
|
|
|
# Their download URL points to a html page that generates a temporary URL embedded within an iframe
|
|
|
|
# 'open-uri' is required to open that page and grab the temporary URL
|
|
|
|
require 'open-uri'
|
|
|
|
# fosshub.com/Audacity.html was verified as official when first introduced to the cask
|
|
|
|
open("http://www.fosshub.com/Audacity.html/audacity-macosx-ub-#{version}.dmg") do |io|
|
|
|
|
content = io.read
|
|
|
|
%r{^\<iframe.*src=\"(http.*\.dmg)\".*>}.match(content)[1].to_s
|
|
|
|
end
|
2016-06-13 17:59:22 +08:00
|
|
|
end
|
2015-09-09 22:04:18 +08:00
|
|
|
name 'Audacity'
|
|
|
|
homepage 'http://audacityteam.org'
|
|
|
|
license :gpl
|
|
|
|
|
2016-06-03 04:25:50 +08:00
|
|
|
suite 'Audacity'
|
2015-11-18 02:18:10 +08:00
|
|
|
|
2016-01-18 09:27:20 +08:00
|
|
|
zap delete: '~/Library/Application Support/audacity'
|
2015-09-09 22:04:18 +08:00
|
|
|
end
|