-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working firefox linux and mac examples
- Loading branch information
Showing
4 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# https://github.com/Homebrew/homebrew-cask/blob/master/Casks/f/firefox.rb | ||
# brew install --cask --verbose ~/Library/AutoPkg/Cache/com.github.jgstew.cask.Firefox-Mac/firefox.rb | ||
cask "firefox" do | ||
version "{{version}}" | ||
|
||
language "en", default: true do | ||
sha256 "{{file_sha256}}" | ||
"en-US" | ||
end | ||
|
||
url "https://download-installer.cdn.mozilla.net/pub/firefox/releases/#{version}/mac/#{language}/Firefox%20#{version}.dmg", | ||
verified: "download-installer.cdn.mozilla.net/pub/firefox/releases/" | ||
name "Mozilla Firefox" | ||
desc "Web browser" | ||
homepage "https://www.mozilla.org/firefox/" | ||
|
||
livecheck do | ||
url "https://download.mozilla.org/?product=firefox-latest-ssl&os=osx" | ||
strategy :header_match | ||
end | ||
|
||
auto_updates true | ||
conflicts_with cask: [ | ||
"firefox@beta", | ||
"firefox@cn", | ||
"firefox@esr", | ||
] | ||
depends_on macos: ">= :catalina" | ||
|
||
app "Firefox.app" | ||
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809) | ||
shimscript = "#{staged_path}/firefox.wrapper.sh" | ||
binary shimscript, target: "firefox" | ||
|
||
preflight do | ||
File.write shimscript, <<~EOS | ||
#!/bin/bash | ||
exec '#{appdir}/Firefox.app/Contents/MacOS/firefox' "$@" | ||
EOS | ||
end | ||
|
||
uninstall quit: "org.mozilla.firefox" | ||
|
||
zap trash: [ | ||
"/Library/Logs/DiagnosticReports/firefox_*", | ||
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.firefox.sfl*", | ||
"~/Library/Application Support/CrashReporter/firefox_*", | ||
"~/Library/Application Support/Firefox", | ||
"~/Library/Caches/Firefox", | ||
"~/Library/Caches/Mozilla/updates/Applications/Firefox", | ||
"~/Library/Caches/org.mozilla.crashreporter", | ||
"~/Library/Caches/org.mozilla.firefox", | ||
"~/Library/Preferences/org.mozilla.crashreporter.plist", | ||
"~/Library/Preferences/org.mozilla.firefox.plist", | ||
"~/Library/Saved Application State/org.mozilla.firefox.savedState", | ||
"~/Library/WebKit/org.mozilla.firefox", | ||
], | ||
rmdir: [ | ||
"~/Library/Application Support/Mozilla", # May also contain non-Firefox data | ||
"~/Library/Caches/Mozilla", | ||
"~/Library/Caches/Mozilla/updates", | ||
"~/Library/Caches/Mozilla/updates/Applications", | ||
] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# https://download.mozilla.org/?product=firefox-latest-ssl&os=osx&lang=en-US | ||
--- | ||
Description: Creates an install script for the latest version of Firefox | ||
Identifier: com.github.jgstew.cask.Firefox-Mac | ||
Input: | ||
NAME: "Firefox" | ||
product: firefox-latest-ssl | ||
OS: osx | ||
filename: Firefox.dmg | ||
MinimumVersion: "2.3" | ||
ParentRecipe: com.github.jgstew.download.Firefox-Mac | ||
Process: | ||
- Processor: com.github.jgstew.SharedProcessors/ContentFromTemplate | ||
Arguments: | ||
template_file_path: "./Mozilla/Firefox-Mac.cask.rb" | ||
content_file_pathname: "%RECIPE_CACHE_DIR%/firefox.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters