use stree::*;
fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>>
{
if std::env::args().count() < 2
{
eprintln!("usage: cmp <SPEC> <PATH>");
std::process::exit(2);
}
let spec = std::env::args().nth(1).expect("args.count() lied if this fails");
let path = std::env::args().nth(2).expect("args.count() lied if this fails");
let tree = Tree::parse_from(&spec)?;
let cmp = tree.compare(&path)?;
print!("{cmp}");
Ok(())
}