-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #45878. Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
f8309b8
commit 518be3a
Showing
1 changed file
with
19 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Onefetch < Formula | ||
desc "Git repository summary on your terminal" | ||
homepage "https://github.com/o2sh/onefetch" | ||
url "https://github.com/o2sh/onefetch/archive/v1.6.5.tar.gz" | ||
sha256 "50f069db2fa713024a19bf708add7812f3420b0c107eb68cd9907d76e375a06d" | ||
|
||
depends_on "rust" => :build | ||
|
||
def install | ||
system "cargo", "install", "--locked", "--root", prefix, "--path", "." | ||
end | ||
|
||
test do | ||
system "#{bin}/onefetch", "--help" | ||
assert_match "onefetch " + version.to_s, shell_output("#{bin}/onefetch -V").chomp | ||
system "git init && echo \"puts 'Hello, world'\" > main.rb && git add main.rb && git commit -m \"First commit\"" | ||
assert_match /Language:.*Ruby/, shell_output("#{bin}/onefetch").chomp | ||
end | ||
end |