homebrew-cask/Casks/copyq.rb

24 lines
806 B
Ruby

cask 'copyq' do
version '3.1.1'
sha256 '04cf492536128e15bb7875d9df407265f828f1ca4ec82f970f25ee3087598724'
# github.com/hluk/CopyQ was verified as official when first introduced to the cask
url "https://github.com/hluk/CopyQ/releases/download/v#{version}/CopyQ.dmg"
appcast 'https://github.com/hluk/CopyQ/releases.atom',
checkpoint: '1753c610fd2594b436fbba4fd4c927aa372c6c37cbd261b9d29533ea1d465865'
name 'CopyQ'
homepage 'https://hluk.github.io/CopyQ/'
app 'CopyQ.app'
# shim script (https://github.com/caskroom/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/copyq.wrapper.sh"
binary shimscript, target: 'copyq'
preflight do
IO.write shimscript, <<-EOS.undent
#!/bin/bash
exec '#{appdir}/CopyQ.app/Contents/MacOS/copyq' "$@"
EOS
end
end