Skip to content

Commit

Permalink
baiduinput: update livecheck, use versioned url
Browse files Browse the repository at this point in the history
  • Loading branch information
khipp committed Jul 4, 2024
1 parent 9c2d615 commit d42c636
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Casks/b/baiduinput.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
cask "baiduinput" do
version "1.0"
sha256 :no_check
version "6.0.3.66,1000e"
sha256 "4d31a7a0dbf09d32eaecc1f0b778f27128707fbc31139fabdb0090a325393974"

url "https://srf.baidu.com/?c=j&e=d&platform=mac"
url "https://imeres.baidu.com/mac/baiduinput_mac_v#{version.csv.first}_#{version.csv.second}.dmg"
name "Baidu Input"
name "安装百度输入法"
homepage "https://srf.baidu.com/input/mac.html"

livecheck do
url :url
strategy :extract_plist
url "https://srf.baidu.com/?c=j&e=d&platform=mac"
regex(/baiduinput[._-]mac[._-]v?(\d+(?:\.\d+)+)[._-](\w+)\.dmg/i)
strategy :header_match do |headers, regex|
headers["location"].scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end

installer manual: "安装百度输入法.app"
Expand Down

0 comments on commit d42c636

Please sign in to comment.