From f8829efb3b7967881253ff0cd2b22ddae2a7b589 Mon Sep 17 00:00:00 2001 From: edef Date: Tue, 3 May 2022 00:13:43 +0000 Subject: ripple/fossil: make store path configurable Change-Id: Ic410619a6115a7059b79593c6fade38236d4e8c1 --- ripple/fossil/src/bin/mount.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ripple/fossil/src/bin/mount.rs') diff --git a/ripple/fossil/src/bin/mount.rs b/ripple/fossil/src/bin/mount.rs index ae26fbb..5a5f276 100644 --- a/ripple/fossil/src/bin/mount.rs +++ b/ripple/fossil/src/bin/mount.rs @@ -11,6 +11,7 @@ use { std::{ cell::RefCell, io::{self, Read, Seek}, + path::PathBuf, time::{Duration, SystemTime, UNIX_EPOCH}, }, }; @@ -73,13 +74,16 @@ fn file_attr(ino: u64, node: &memtree::Node) -> fuser::FileAttr { } #[derive(clap::Parser)] -struct Args {} +struct Args { + #[clap(long, default_value = "fossil.db")] + store: PathBuf, +} fn main() { env_logger::init(); - let _args = Args::parse(); + let args = Args::parse(); - let store = fossil::Store::open("fossil.db").unwrap(); + let store = fossil::Store::open(args.store).unwrap(); let root = memtree::load_root(&store, { let mut stdin = io::stdin(); -- cgit 1.4.1