txt2man 1.7.1 (new formula)

* txt2man 1.7.1 (new formula)
* txt2man: remove bash dep

Closes #118354.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2022-12-16 19:52:56 -05:00 committed by BrewTestBot
parent ca758a0641
commit e8fc858fd3
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 27 additions and 0 deletions

27
Formula/txt2man.rb Normal file
View File

@ -0,0 +1,27 @@
class Txt2man < Formula
desc "Converts flat ASCII text to man page format"
homepage "https://github.com/mvertes/txt2man/"
url "https://github.com/mvertes/txt2man/archive/refs/tags/txt2man-1.7.1.tar.gz"
sha256 "4d9b1bfa2b7a5265b4e5cb3aebc1078323b029aa961b6836d8f96aba6a9e434d"
license "GPL-2.0-or-later"
depends_on "gawk"
def install
system "make", "install", "prefix=#{prefix}"
end
test do
(testpath/"foo.txt").write "foo"
(testpath/"foo.1").write Utils.safe_popen_read(bin/"txt2man", "-d", "17 Dec 2022", testpath/"foo.txt")
expected = <<~EOS
.\\" Text automatically generated by txt2man
.TH untitled "17 Dec 2022" "" ""
.RS
foo
EOS
assert_equal expected, (testpath/"foo.1").read
end
end