Skip to content

Commit 2e33aee

Browse files
committedAug 28, 2022
feat: add docopts formula
- docopts does not yet have a Brew formula, so testing creating one with my tap - see also my issue: docopt/docopts#59
1 parent e9ff558 commit 2e33aee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎Formula/docopts.rb

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class Docopts < Formula
2+
desc "Shell interpreter for docopt, the command-line interface description language"
3+
homepage "https://github.com/docopt/docopts"
4+
url "https://github.com/docopt/docopts/archive/v0.6.4-with-no-mangle-double-dash.tar.gz"
5+
sha256 "5bf29a4eaa07cb3d1449077697d8746678cc490ee3e63cfe3e1025cebf2f4008"
6+
head "https://github.com/docopt/docopts.git", branch: "master"
7+
license "MIT"
8+
9+
depends_on "go" => :build
10+
11+
def install
12+
system "go", "build", "docopts.go"
13+
prefix.install_metafiles
14+
prefix.install "docopts.sh" # helper functions, meant to be sourced
15+
end
16+
17+
test do
18+
assert_match "Shell interface for docopt, the CLI description language.", shell_output("#{bin}/docopts -h")
19+
end
20+
end

0 commit comments

Comments
 (0)
Please sign in to comment.