blob: 9024b81744c7ceb601378b8f2070d12ac7a4d3f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
// SPDX-License-Identifier: OSL-3.0
use {clap::StructOpt, std::path::PathBuf};
#[derive(clap::Parser)]
struct Args {
dir: PathBuf,
#[clap(long, default_value = "fossil.db")]
store: PathBuf,
}
fn main() {
let args = Args::parse();
let store = fossil::Store::open(args.store).unwrap();
let root = store.add_directory(args.dir);
println!("{}", fossil::digest_str(&root.ident));
}
|