forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagej.rb
27 lines (22 loc) · 843 Bytes
/
imagej.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
cask "imagej" do
arch arm: "arm-java13", intel: "java8"
version "1.54"
sha256 arm: "8366d8c2d56602855fd375d7fb06a4d5b755258cb96ecd83e1310709d3959d90",
intel: "2349e9c32378dbfc2f1b3be58475161eb9d076c16938502fa2000afe116ea933"
url "https://wsr.imagej.net/distros/osx/ij#{version.no_dots}-osx-#{arch}.zip"
name "ImageJ"
desc "Image Processing and Analysis in Java"
homepage "https://imagej.net/ij/"
livecheck do
url "https://imagej.net/ij/download.html"
regex(%r{href=.*?/ij(\d+(?:\.\d+)*)[._-]osx[._-]java\d+\.zip}i)
strategy :page_match do |page, regex|
page.scan(regex).map do |match|
text = match.first
text.include?(".") ? text : text.sub(/(\d)(\d+)/, '\1.\2')
end
end
end
app "ImageJ.app"
zap trash: "~/Library/Saved Application State/ImageJ.savedState"
end