forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uutils-diffutils 0.4.1 (new formula)
autobump: add uutils-diffutils Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
a5c6632
commit 5603de0
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2113,6 +2113,7 @@ usb.ids | |
usbredir | ||
util-macros | ||
uutils-coreutils | ||
uutils-diffutils | ||
uutils-findutils | ||
uuu | ||
uv | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class UutilsDiffutils < Formula | ||
desc "Cross-platform Rust rewrite of the GNU diffutils" | ||
homepage "https://github.com/uutils/diffutils" | ||
url "https://github.com/uutils/diffutils/archive/refs/tags/v0.4.1.tar.gz" | ||
sha256 "3b1f37626558c15a37111846ce9de6cb88fb2e3290d7068a151cec1d9d7075c3" | ||
license any_of: ["Apache-2.0", "MIT"] | ||
head "https://github.com/uutils/diffutils.git", branch: "main" | ||
|
||
depends_on "rust" => :build | ||
|
||
def install | ||
system "cargo", "install", *std_cargo_args(root: libexec) | ||
mv libexec/"bin", libexec/"uubin" | ||
Dir.children(libexec/"uubin").each do |cmd| | ||
bin.install_symlink libexec/"uubin"/cmd => "u#{cmd}" | ||
end | ||
end | ||
|
||
def caveats | ||
<<~EOS | ||
All commands have been installed with the prefix "u". | ||
If you need to use these commands with their normal names, you | ||
can add a "uubin" directory to your PATH from your bashrc like: | ||
PATH="#{opt_libexec}/uubin:$PATH" | ||
EOS | ||
end | ||
|
||
test do | ||
(testpath/"a").write "foo" | ||
(testpath/"b").write "foo" | ||
system bin/"udiffutils", "a", "b" | ||
end | ||
end |