navinstall/src/args.rs

34 lines
1.3 KiB
Rust
Raw Normal View History

2024-12-27 07:11:37 +01:00
use clap::{arg, command};
pub fn get_args() -> clap::ArgMatches {
command!()
.about("navOS Installer")
2024-12-28 03:37:15 +01:00
.subcommand(
command!("create-iso")
.about("Create a new installation medium ISO")
2024-12-29 11:43:52 +01:00
.arg(arg!(--without_gui "Create ISO with just terminal"))
.arg(arg!(--kb_layout <LAYOUT> "Create ISO with this keyboard layout"))
2025-01-06 09:36:21 +01:00
.arg(arg!(--kb_variant <VARIANT> "Create ISO with this keyboard layout variant"))
.arg(arg!(--install <CONFIG> "Create ISO which automatically installs <CONFIG> upon boot."))
2024-12-28 03:37:15 +01:00
)
2024-12-27 07:11:37 +01:00
.subcommand(
command!()
.name("install")
.about("Install a system according to configuration")
2025-01-06 09:36:21 +01:00
.arg(arg!(-f --force "Install without confirming config"))
2024-12-27 07:11:37 +01:00
.arg(arg!([config] "Config file").required(true)),
)
.subcommand(
command!()
.name("create-tar")
.about("Create a container tar image"),
)
.subcommand(
command!()
.name("create-img")
.about("Create an install on a disk image for VMs or embedded devices")
.arg(arg!([config] "Config file").required(true)),
)
.get_matches()
}