shitbox/corebox/main.rs
Nathan Fisher 06b88d2c24 Refactoring:
- Split into workspace crates
- Split into two binaries `corebox` and `hashbox`
- Add `mount` crate to workspace to prepare for third binary `utilbox`
2023-02-05 23:50:59 -05:00

19 lines
488 B
Rust

use std::process;
mod commands;
fn main() {
if let Some(progname) = shitbox::progname() {
if let Some(command) = commands::get(&progname) {
let cli = command.cli();
if let Err(e) = command.run(&cli.get_matches()) {
eprintln!("{progname}: Error: {e}");
process::exit(1);
}
} else {
eprintln!("shitbox: Error: unknown command {progname}");
process::exit(1);
}
}
}