homebrew-cask/Casks/lightproxy.rb

25 lines
921 B
Ruby

cask 'lightproxy' do
version '1.1.11'
sha256 '6c8be69236e3b9f4ba64370666fd30287e84cd7e67911908580aa13af2c0e8e3'
# gw.alipayobjects.com/os/LightProxy was verified as official when first introduced to the cask
url 'https://gw.alipayobjects.com/os/LightProxy/LightProxy.dmg'
appcast 'https://github.com/alibaba/lightproxy/tree/develop/CHANGELOG'
name 'LightProxy'
homepage 'https://alibaba.github.io/lightproxy/'
app 'LightProxy.app'
uninstall_postflight do
stdout, * = system_command '/usr/bin/security',
args: ['find-certificate', '-a', '-c', 'LigthProxy', '-Z'],
sudo: true
hashes = stdout.lines.grep(%r{^SHA-256 hash:}) { |l| l.split(':').second.strip }
hashes.each do |h|
system_command '/usr/bin/security',
args: ['delete-certificate', '-Z', h],
sudo: true
end
end
end