|
| 1 | +class Tome < Formula |
| 2 | + desc "Modern replacement for 'sub'" |
| 3 | + homepage "https://the.exa.website" |
| 4 | + url "https://github.com/zph/tome" |
| 5 | + sha256 "96e743ffac0512a278de9ca3277183536ee8b691a46ff200ec27e28108fef783" |
| 6 | + license "MIT" |
| 7 | + revision 2 |
| 8 | + version '0.1.0' |
| 9 | + |
| 10 | + livecheck do |
| 11 | + url :stable |
| 12 | + strategy :github_latest |
| 13 | + end |
| 14 | + |
| 15 | + head do |
| 16 | + url "https://github.com/zph/tome.git" |
| 17 | + end |
| 18 | + |
| 19 | + depends_on "rust" => :build |
| 20 | + |
| 21 | + # uses_from_macos "zlib" |
| 22 | + |
| 23 | + # on_linux do |
| 24 | + # depends_on "libgit2" |
| 25 | + # end |
| 26 | + |
| 27 | +# # Replace stale lock file. Remove at version bump. |
| 28 | +# resource "Cargo.lock" do |
| 29 | +# url "https://github.com/raw/ogham/exa/61c5df7c111fc7451bf6b8f0dfdcb2b6b46577d0/Cargo.lock" |
| 30 | +# sha256 "0bc38c483120874c42b9ada35d13530f16850274cfa8ff1defc1e55bba509698" |
| 31 | +# end |
| 32 | + |
| 33 | + def install |
| 34 | + # Remove at version bump |
| 35 | + # unless build.head? |
| 36 | + # rm_f "Cargo.lock" |
| 37 | + # resource("Cargo.lock").stage buildpath |
| 38 | + # end |
| 39 | + |
| 40 | + system "cargo", "install", *std_cargo_args |
| 41 | + |
| 42 | + # # Remove in 0.9+ |
| 43 | + # if build.head? |
| 44 | + # bash_completion.install "completions/completions.bash" => "exa" |
| 45 | + # zsh_completion.install "completions/completions.zsh" => "_exa" |
| 46 | + # fish_completion.install "completions/completions.fish" => "exa.fish" |
| 47 | + |
| 48 | + # args = %w[ |
| 49 | + # --standalone |
| 50 | + # --to=man |
| 51 | + # ] |
| 52 | + |
| 53 | + # system "pandoc", *args, "man/exa.1.md", "-o", "exa.1" |
| 54 | + # system "pandoc", *args, "man/exa_colors.5.md", "-o", "exa_colors.5" |
| 55 | + |
| 56 | + # man1.install "exa.1" |
| 57 | + # man5.install "exa_colors.5" |
| 58 | + # else |
| 59 | + # bash_completion.install "contrib/completions.bash" => "exa" |
| 60 | + # zsh_completion.install "contrib/completions.zsh" => "_exa" |
| 61 | + # fish_completion.install "contrib/completions.fish" => "exa.fish" |
| 62 | + # man1.install "contrib/man/exa.1" |
| 63 | + # end |
| 64 | + end |
| 65 | + |
| 66 | + test do |
| 67 | + # (testpath/"test.txt").write("") |
| 68 | + # assert_match "test.txt", shell_output("#{bin}/exa") |
| 69 | + end |
| 70 | +end |
0 commit comments