-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
/
Copy pathalfred.rb
34 lines (28 loc) · 1.19 KB
/
alfred.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cask "alfred" do
version "5.1.2,2145"
sha256 "d21e85f383546a7ce25f6085fdd4008d6f1a52844cd4cce19bc4b0f0b17d13de"
url "https://cachefly.alfredapp.com/Alfred_#{version.csv.first}_#{version.csv.second}.dmg"
name "Alfred"
desc "Application launcher and productivity software"
homepage "https://www.alfredapp.com/"
livecheck do
url "https://www.alfredapp.com/app/update#{version.major}/general.xml"
regex(/Alfred[._-]v?(\d(?:\.\d+)+)[._-](\d+)\.tar\.gz/i)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end
auto_updates true
depends_on macos: ">= :mojave"
app "Alfred #{version.major}.app"
uninstall login_item: "Alfred#{version.major}",
quit: "com.runningwithcrayons.Alfred"
zap trash: [
"~/Library/Application Support/Alfred",
"~/Library/Caches/com.runningwithcrayons.Alfred",
"~/Library/Cookies/com.runningwithcrayons.Alfred.binarycookies",
"~/Library/Preferences/com.runningwithcrayons.Alfred.plist",
"~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist",
"~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState",
]
end