|
|
|
@ -4,9 +4,6 @@ fn main() {
|
|
|
|
|
let app = App::new("jade")
|
|
|
|
|
.version(env!("CARGO_PKG_VERSION"))
|
|
|
|
|
.about(env!("CARGO_PKG_DESCRIPTION"))
|
|
|
|
|
.subcommand(
|
|
|
|
|
SubCommand::with_name("set")
|
|
|
|
|
.about("Sets a value for installation")
|
|
|
|
|
.subcommand(
|
|
|
|
|
SubCommand::with_name("partition")
|
|
|
|
|
.about("Partition the install destination")
|
|
|
|
@ -29,6 +26,11 @@ fn main() {
|
|
|
|
|
Arg::with_name("swap")
|
|
|
|
|
.help("The swap partition to use (only read if mode is manual)")
|
|
|
|
|
.required_if("mode", "manual"),
|
|
|
|
|
)
|
|
|
|
|
.arg(
|
|
|
|
|
Arg::with_name("device")
|
|
|
|
|
.help("The device to partition (only read if mode is automatic)")
|
|
|
|
|
.required_if("mode", "auto"),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.subcommand(
|
|
|
|
@ -114,19 +116,20 @@ fn main() {
|
|
|
|
|
.help("If flatpak should be installed")
|
|
|
|
|
.required(true),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
).get_matches();
|
|
|
|
|
|
|
|
|
|
if let Some(app) = app.subcommand_matches("set") {
|
|
|
|
|
|
|
|
|
|
if let Some(app) = app.subcommand_matches("partition") {
|
|
|
|
|
let mode = app.value_of("mode").unwrap();
|
|
|
|
|
let root = app.value_of("root").unwrap_or("none");
|
|
|
|
|
let boot = app.value_of("boot").unwrap_or("none");
|
|
|
|
|
let swap = app.value_of("swap").unwrap_or("none");
|
|
|
|
|
let device = app.value_of("device").unwrap_or("none");
|
|
|
|
|
println!("mode: {}", mode);
|
|
|
|
|
println!("root: {}", root);
|
|
|
|
|
println!("boot: {}", boot);
|
|
|
|
|
println!("swap: {}", swap);
|
|
|
|
|
println!("device: {}", device);
|
|
|
|
|
} else if let Some(app) = app.subcommand_matches("timezone") {
|
|
|
|
|
let timezone = app.value_of("timezone").unwrap();
|
|
|
|
|
println!("{}", timezone);
|
|
|
|
@ -155,7 +158,6 @@ fn main() {
|
|
|
|
|
} else if let Some(app) = app.subcommand_matches("flatpak") {
|
|
|
|
|
let flatpak = app.value_of("flatpak").unwrap();
|
|
|
|
|
println!("{}", flatpak);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
println!("Running TUI installer");
|
|
|
|
|
}
|
|
|
|
|