mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
27 lines
414 B
Rust
27 lines
414 B
Rust
|
|
mod tasks;
|
||
|
|
|
||
|
|
use clap::Parser;
|
||
|
|
|
||
|
|
use crate::tasks::Task;
|
||
|
|
|
||
|
|
#[derive(clap::Parser)]
|
||
|
|
struct BaseArgs {
|
||
|
|
#[command(subcommand)]
|
||
|
|
task: Task,
|
||
|
|
#[command(flatten)]
|
||
|
|
args: Args,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(clap::Args)]
|
||
|
|
struct Args {
|
||
|
|
/// Simulate without actually touching the filesystem
|
||
|
|
#[arg(long)]
|
||
|
|
dry_run: bool,
|
||
|
|
}
|
||
|
|
|
||
|
|
fn main() -> impl std::process::Termination {
|
||
|
|
let BaseArgs { task, args } = BaseArgs::parse();
|
||
|
|
|
||
|
|
task.invoke(args)
|
||
|
|
}
|