File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ defn main(version):
88 download-releases: version
99 update-brew: version
1010
11+ defn sha256sum(file):
12+ os =: System/getProperty("os.name")
13+ cond:
14+ os =~ /Mac\s?OS/: sh("shasum -a 256 $file")
15+ else: sh("sha256sum $file")
16+
1117defn update-brew(version):
1218 releases =: releases(version)
1319
@@ -22,7 +28,7 @@ defn update-brew(version):
2228 text =:
2329 reduce-kv _ text releases:
2430 fn(text key file):
25- sha256 =: sh(" sha256sum $ file" ).out:words.0
31+ sha256 =: sha256sum( file).out:words.0
2632 text: .replace(key sha256)
2733
2834 say: "Updating homebrew-yamlscript/ys.rb"
@@ -51,7 +57,7 @@ defn download-releases(version):
5157 when-not fs-e(file):
5258 say: "Downloading $file"
5359 url =: "$releases-url/download/$version/$file"
54- res =: sh("wget -q $url")
60+ res =: sh("curl --silent --location $url --output $file ")
5561 when res.exit:N.?:
5662 die: "Download of '$url' failed:\n$(res.err)"
5763
You can’t perform that action at this time.
0 commit comments