Skip to content

Commit

Permalink
rustic 0.9.5 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiripospisil committed Feb 23, 2025
1 parent cadec4a commit 339fee4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Formula/r/rustic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class Rustic < Formula
desc "Fast, encrypted, and deduplicated backups powered by Rust"
homepage "https://rustic.cli.rs"
url "https://github.com/rustic-rs/rustic/archive/refs/tags/v0.9.5.tar.gz"
sha256 "cb26f48325897946e7e6995d7617741586dfee0229ada1dfecb01e8ac90c4967"
license "Apache-2.0"
head "https://github.com/rustic-rs/rustic.git", branch: "main"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args
generate_completions_from_executable(bin/"rustic", "completions")
end

test do
mkdir testpath/"rustic_repo"
ENV["RUSTIC_REPOSITORY"] = testpath/"rustic_repo"
ENV["RUSTIC_PASSWORD"] = "test"

(testpath/"testfile").write("test test test")

system bin/"rustic", "init"
system bin/"rustic", "backup", "testfile"

system bin/"rustic", "restore", "latest:testfile", testpath/"testfile_restore"
assert compare_file testpath/"testfile", testpath/"testfile_restore"
end
end

0 comments on commit 339fee4

Please sign in to comment.