-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformula.rb
More file actions
35 lines (31 loc) · 871 Bytes
/
Copy pathformula.rb
File metadata and controls
35 lines (31 loc) · 871 Bytes
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
35
class {{package}} < Formula
desc "{{description}}"
homepage "{{homepage}}"
version "{{version}}"
license "{{license}}"
{%- for asset in assets %}
if OS.{{asset.os}}? && Hardware::CPU.{{asset.cpu}}?
url "{{asset.url}}"{{using_strategy}}
sha256 "{{asset.sha256}}"
end
{%- endfor %}
def install
{%- for asset in assets %}
if OS.{{ asset.os }}? && Hardware::CPU.{{ asset.cpu }}?
{%- for exe in executables %}
bin.install {{ exe }}
{%- endfor %}
end
{%- endfor %}
doc_files = Dir["README.*", "readme.*", "LICENSE", "LICENSE.*", "CHANGELOG.*"]
leftover_contents = Dir["*"] - doc_files
pkgshare.install(*leftover_contents) unless leftover_contents.empty?
end
{%- if caveats %}
def caveats
<<~EOS
{{ caveats }}
EOS
end
{%- endif %}
end