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