pipe-rename 1.4.2 (new formula)
Closes #105108. Signed-off-by: Rui Chen <rui@chenrui.dev> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
db82947f7d
commit
832ca8826a
|
@ -0,0 +1,23 @@
|
|||
class PipeRename < Formula
|
||||
desc "Rename your files using your favorite text editor"
|
||||
homepage "https://github.com/marcusbuffett/pipe-rename"
|
||||
url "https://crates.io/api/v1/crates/pipe-rename/1.4.2/download"
|
||||
sha256 "9ab27232bc216e23c567ecdcd6f8a590f76a24aa5d9a563e73a21415af82c1df"
|
||||
license "MIT"
|
||||
|
||||
depends_on "rust" => :build
|
||||
|
||||
def install
|
||||
system "tar", "xvf", "pipe-rename-#{version}.crate", "--strip-components=1"
|
||||
system "cargo", "install", *std_cargo_args
|
||||
end
|
||||
|
||||
test do
|
||||
touch "test.log"
|
||||
(testpath/"rename.sh").write "#!/bin/sh\necho \"$(cat \"$1\").txt\" > \"$1\""
|
||||
chmod "+x", testpath/"rename.sh"
|
||||
ENV["EDITOR"] = testpath/"rename.sh"
|
||||
system "#{bin}/renamer", "-y", "test.log"
|
||||
assert_predicate testpath/"test.log.txt", :exist?
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue