Add shim script

This commit is contained in:
Sam Bishop
2023-12-30 13:29:55 -08:00
parent b08ec53610
commit 70ff0e2d27
+9 -1
View File
@@ -18,8 +18,16 @@ cask "godot-mono" do
depends_on macos: ">= :sierra"
app "Godot_mono.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/godot-mono.wrapper.sh"
binary shimscript, target: "godot-mono"
bin.write_exec_script "#{appdir}/Godot_mono.app/Contents/MacOS/Godot", target: "godot-mono"
preflight do
File.write shimscript, <<~EOS
#!/bin/bash
'#{appdir}/Godot_mono.app/Contents/MacOS/Godot' "$@"
EOS
end
uninstall quit: "org.godotengine.godot"