Fix brew style (#111896)
* android-ndk: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * armitage: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * bandage: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * blender: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * chromium: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * copyq: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * crystax-ndk: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * cutter: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * dwarf-fortress: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * dynamodb-local: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * gitfiend: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * gloomhaven-helper: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * gogs: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * gqrx: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * inkscape: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * kdiff3: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * kitty: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * klogg: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * lbry: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * libreoffice: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * lilypond: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * meld: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * musescore: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * nudge: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * p4v: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * prince: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * steamcmd: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * subsync: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * tiled: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * uniflash: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * upic: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * vlc: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * cmd/lib/check: fix brew style. Part of https://github.com/Homebrew/brew/pull/12152. * bump chromium version(s) Co-authored-by: Bevan Kay <email@bevankay.me>
This commit is contained in:
parent
ae6bc3cb2c
commit
e89aff38cf
|
@ -20,7 +20,7 @@ cask "android-ndk" do
|
|||
preflight do
|
||||
FileUtils.ln_sf("#{staged_path}/android-ndk-r#{version}", "#{HOMEBREW_PREFIX}/share/android-ndk")
|
||||
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
readonly executable="#{staged_path}/android-ndk-r#{version}/$(basename ${0})"
|
||||
test -f "${executable}" && exec "${executable}" "${@}"
|
||||
|
|
|
@ -21,7 +21,7 @@ cask "armitage" do
|
|||
binary shimscript, target: "armitage"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
java "$@" -jar '#{appdir}/Armitage.app/Contents/Java/armitage.jar'
|
||||
EOS
|
||||
|
|
|
@ -14,7 +14,7 @@ cask "bandage" do
|
|||
binary shimscript, target: "bandage"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/Bandage.app/Contents/MacOS/Bandage' "$@"
|
||||
EOS
|
||||
|
|
|
@ -31,7 +31,7 @@ cask "blender" do
|
|||
# make __pycache__ directories writable, otherwise uninstall fails
|
||||
FileUtils.chmod "u+w", Dir.glob("#{staged_path}/*.app/**/__pycache__")
|
||||
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
'#{appdir}/Blender.app/Contents/MacOS/Blender' "$@"
|
||||
EOS
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
cask "chromium" do
|
||||
version "925072"
|
||||
|
||||
if Hardware::CPU.intel?
|
||||
sha256 "2ff1f6c4fec1499ddab78f4a816703f203701312016ba047be8b04b87c4dfb43"
|
||||
version "926705"
|
||||
sha256 "689e5e5b7d56df326387927e9cdac26882b937e58ba99150c32059521fdde86c"
|
||||
|
||||
url "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/#{version}/chrome-mac.zip",
|
||||
verified: "commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/"
|
||||
|
@ -12,7 +11,8 @@ cask "chromium" do
|
|||
regex(/v?(\d+(?:\.\d+)*)/i)
|
||||
end
|
||||
else
|
||||
sha256 "9d8f5d7b9e90027c49dbf3b584de82d0b15d5743349d16a2542367c94e4c78da"
|
||||
version "926706"
|
||||
sha256 "b697d2d096fa2fcab368058ba60a609d136fce6030483cca79cb33edc50ca5b7"
|
||||
|
||||
url "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac_Arm/#{version}/chrome-mac.zip",
|
||||
verified: "commondatastorage.googleapis.com/chromium-browser-snapshots/Mac_Arm/"
|
||||
|
@ -38,7 +38,7 @@ cask "chromium" do
|
|||
binary shimscript, target: "chromium"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/Chromium.app/Contents/MacOS/Chromium' "$@"
|
||||
EOS
|
||||
|
|
|
@ -14,7 +14,7 @@ cask "copyq" do
|
|||
binary shimscript, target: "copyq"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
exec '#{appdir}/CopyQ.app/Contents/MacOS/CopyQ' "$@"
|
||||
EOS
|
||||
|
|
|
@ -19,7 +19,7 @@ cask "crystax-ndk" do
|
|||
preflight do
|
||||
FileUtils.ln_sf("#{staged_path}/crystax-ndk-#{version}", "#{HOMEBREW_PREFIX}/share/crystax-ndk")
|
||||
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
readonly executable="#{staged_path}/crystax-ndk-#{version}/$(basename ${0})"
|
||||
test -f "${executable}" && exec "${executable}" "${@}"
|
||||
|
|
|
@ -21,7 +21,7 @@ cask "cutter" do
|
|||
binary shimscript, target: "cutter"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
'#{appdir}/Cutter.app/Contents/MacOS/Cutter' "$@"
|
||||
EOS
|
||||
|
|
|
@ -17,7 +17,7 @@ cask "dwarf-fortress" do
|
|||
binary shimscript, target: "dwarf-fortress"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{staged_path}/df_osx/df' "$@"
|
||||
EOS
|
||||
|
|
|
@ -12,7 +12,7 @@ cask "dynamodb-local" do
|
|||
binary shimscript, target: "dynamodb-local"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
cd "$(dirname "$(readlink -n "${0}")")" && \
|
||||
java -Djava.library.path='./DynamoDBLocal_lib' -jar 'DynamoDBLocal.jar' "$@"
|
||||
|
|
|
@ -22,7 +22,7 @@ cask "gitfiend" do
|
|||
binary shimscript, target: "gitfiend"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/GitFiend.app/Contents/MacOS/GitFiend' "$@"
|
||||
EOS
|
||||
|
|
|
@ -18,7 +18,7 @@ cask "gloomhaven-helper" do
|
|||
binary shimscript, target: "gloomhaven-helper"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$(readlink -n "${0}")")" && \
|
||||
java "${@}" -XstartOnFirstThread -jar 'ghh.jar'
|
||||
|
|
|
@ -13,7 +13,7 @@ cask "gogs" do
|
|||
binary shimscript, target: "gogs"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
cd '#{staged_path}/gogs' && ./gogs "$@"
|
||||
EOS
|
||||
|
|
|
@ -16,7 +16,7 @@ cask "gqrx" do
|
|||
binary shimscript, target: "gqrx"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
'#{appdir}/Gqrx.app/Contents/MacOS/gqrx' "$@"
|
||||
EOS
|
||||
|
|
|
@ -18,7 +18,7 @@ cask "inkscape" do
|
|||
binary shimscript, target: "inkscape"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{staged_path}/Inkscape.app/Contents/MacOS/inkscape' "$@"
|
||||
EOS
|
||||
|
|
|
@ -18,7 +18,7 @@ cask "kdiff3" do
|
|||
binary shimscript, target: "kdiff3"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
'#{appdir}/kdiff3.app/Contents/MacOS/kdiff3' "$@"
|
||||
EOS
|
||||
|
|
|
@ -15,7 +15,7 @@ cask "kitty" do
|
|||
binary shimscript, target: "kitty"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/kitty.app/Contents/MacOS/kitty' "$@"
|
||||
EOS
|
||||
|
|
|
@ -19,7 +19,7 @@ cask "klogg" do
|
|||
binary shimscript, target: "klogg"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/klogg.app/Contents/MacOS/klogg' "$@"
|
||||
EOS
|
||||
|
|
|
@ -21,12 +21,12 @@ cask "lbry" do
|
|||
binary shim_lbryfirst, target: "lbry-first"
|
||||
|
||||
preflight do
|
||||
IO.write shim_lbrynet, <<~EOS
|
||||
File.write shim_lbrynet, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/LBRY.app/Contents/Resources/static/daemon/lbrynet' "$@"
|
||||
EOS
|
||||
|
||||
IO.write shim_lbryfirst, <<~EOS
|
||||
File.write shim_lbryfirst, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/LBRY.app/Contents/Resources/static/lbry-first/lbry-first' "$@"
|
||||
EOS
|
||||
|
|
|
@ -42,7 +42,7 @@ cask "libreoffice" do
|
|||
binary shimscript, target: "soffice"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
'#{appdir}/LibreOffice.app/Contents/MacOS/soffice' "$@"
|
||||
EOS
|
||||
|
|
|
@ -32,7 +32,7 @@ cask "lilypond" do
|
|||
preflight do
|
||||
binaries.each do |shimscript|
|
||||
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
|
||||
IO.write "#{staged_path}/#{shimscript}.wrapper.sh", <<~EOS
|
||||
File.write "#{staged_path}/#{shimscript}.wrapper.sh", <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/LilyPond.app/Contents/Resources/bin/#{shimscript}' "$@"
|
||||
EOS
|
||||
|
|
|
@ -25,7 +25,7 @@ cask "meld" do
|
|||
binary shimscript, target: "meld"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/Meld.app/Contents/MacOS/Meld' "$@"
|
||||
EOS
|
||||
|
|
|
@ -22,7 +22,7 @@ cask "musescore" do
|
|||
binary shimscript, target: "mscore"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/MuseScore #{version.major}.app/Contents/MacOS/mscore' "$@"
|
||||
EOS
|
||||
|
|
|
@ -15,7 +15,7 @@ cask "nudge" do
|
|||
binary shimscript, target: "nudge"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge' "$@"
|
||||
EOS
|
||||
|
|
|
@ -29,7 +29,7 @@ cask "p4v" do
|
|||
binary p4_wrapper, target: "p4merge"
|
||||
|
||||
preflight do
|
||||
IO.write p4_wrapper, <<~EOS
|
||||
File.write p4_wrapper, <<~EOS
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
COMMAND=$(basename "$0")
|
||||
|
|
|
@ -18,7 +18,7 @@ cask "prince" do
|
|||
binary shimscript, target: "prince"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{staged_path}/prince-#{version}-macos/lib/prince/bin/prince' --prefix '#{staged_path}/prince-#{version}-macos/lib/prince' "$@"
|
||||
EOS
|
||||
|
|
|
@ -12,7 +12,7 @@ cask "steamcmd" do
|
|||
binary shimscript, target: "steamcmd"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{staged_path}/steamcmd.sh' "$@"
|
||||
EOS
|
||||
|
|
|
@ -14,7 +14,7 @@ cask "subsync" do
|
|||
binary shimscript, target: "subsync"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/subsync.app/Contents/MacOS/subsync' --cli "$@"
|
||||
EOS
|
||||
|
|
|
@ -16,7 +16,7 @@ cask "tiled" do
|
|||
binary shimscript, target: "tiled"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
exec '#{appdir}/Tiled.app/Contents/MacOS/Tiled' "$@"
|
||||
EOS
|
||||
|
|
|
@ -21,7 +21,7 @@ cask "uniflash" do
|
|||
binary shimscript
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '/Applications/TI/UniFlash/dslite.sh' "$@"
|
||||
EOS
|
||||
|
|
|
@ -14,7 +14,7 @@ cask "upic" do
|
|||
binary shimscript, target: "upic"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/bash
|
||||
'#{appdir}/uPic.app/Contents/MacOS/uPic' "$@"
|
||||
EOS
|
||||
|
|
|
@ -31,7 +31,7 @@ cask "vlc" do
|
|||
binary shimscript, target: "vlc"
|
||||
|
||||
preflight do
|
||||
IO.write shimscript, <<~EOS
|
||||
File.write shimscript, <<~EOS
|
||||
#!/bin/sh
|
||||
exec '#{appdir}/VLC.app/Contents/MacOS/VLC' "$@"
|
||||
EOS
|
||||
|
|
|
@ -48,9 +48,7 @@ module Check
|
|||
system_command!("/bin/launchctl", args: ["list"], print_stderr: false, sudo: sudo)
|
||||
.stdout
|
||||
.lines.drop(1)
|
||||
.reject do |id|
|
||||
id.match?(/\A(?:application\.)?com\.apple\.(installer|Safari|systemevents|systempreferences)(?:\.|$)/)
|
||||
end
|
||||
.grep_v(/\A(?:application\.)?com\.apple\.(installer|Safari|systemevents|systempreferences)(?:\.|$)/)
|
||||
end
|
||||
|
||||
[false, true]
|
||||
|
@ -125,12 +123,12 @@ module Check
|
|||
|
||||
running_apps = diff[:loaded_launchjobs]
|
||||
.added
|
||||
.select { |id| id.match?(/\.\d+\Z/) }
|
||||
.grep(/\.\d+\Z/)
|
||||
.map { |id| id.sub(/\A(?:application\.)?(.*?)(?:\.\d+){0,2}\Z/, '\1') }
|
||||
|
||||
loaded_launchjobs = diff[:loaded_launchjobs]
|
||||
.added
|
||||
.reject { |id| id.match?(/\.\d+\Z/) }
|
||||
.grep_v(/\.\d+\Z/)
|
||||
|
||||
missing_running_apps = running_apps - Array(uninstall_directives[:quit])
|
||||
if missing_running_apps.any?
|
||||
|
|
Loading…
Reference in New Issue