actually use the genfstab function

axtloss/rework-partitioning
amy 3 years ago
parent c0eef77d11
commit 533b9e7cb1

@ -13,7 +13,13 @@ pub fn choose_pkgs(desktop_setup: &str) {
]);
}
"gnome" => {
install(vec!["xorg", "gnome", "gnome-tweaks", "chrome-gnome-shell", "gdm",]);
install(vec![
"xorg",
"gnome",
"gnome-tweaks",
"chrome-gnome-shell",
"gdm",
]);
}
"kde" => {
install(vec![

@ -309,16 +309,9 @@ fn mount(partition: &str, mountpoint: &str, options: &str) {
exec_eval(
exec(
"mount",
vec![
String::from(partition),
String::from(mountpoint),
],
vec![String::from(partition), String::from(mountpoint)],
),
format!(
"mount {} with no options at {}",
partition, mountpoint
)
.as_str(),
format!("mount {} with no options at {}", partition, mountpoint).as_str(),
);
}
}

@ -15,7 +15,11 @@ pub fn create_file(path: &str) {
}
pub fn append_file(path: &str, content: &str) -> std::io::Result<()> {
log(format!("[ \x1b[2;1;32mOK\x1b[0m ] Append '{}' to file {}", content.replace("\n", ""), path));
log(format!(
"[ \x1b[2;1;32mOK\x1b[0m ] Append '{}' to file {}",
content.replace("\n", ""),
path
));
let mut file = OpenOptions::new().append(true).open(path)?;
file.write_all(content.as_bytes())?;
Ok(())

@ -1,9 +1,12 @@
use std::process::Command;
use crate::internal::*;
use std::process::Command;
pub fn install(pkgs: Vec<&str>) {
exec_eval(Command::new("crystalstrap")
.arg("/mnt")
.args(&pkgs)
.status(), format!("Install packages {}", pkgs.join(", ")).as_str());
exec_eval(
Command::new("crystalstrap")
.arg("/mnt")
.args(&pkgs)
.status(),
format!("Install packages {}", pkgs.join(", ")).as_str(),
);
}

@ -2,7 +2,7 @@ use crate::internal::*;
pub fn exec_eval(
return_code: std::result::Result<std::process::ExitStatus, std::io::Error>,
logmsg: &str
logmsg: &str,
) {
match &return_code {
Ok(_) => {

@ -193,6 +193,8 @@ fn main() {
}
} else if app.subcommand_matches("install-base").is_some() {
base::install_base_packages();
} else if app.subcommand_matches("install-base").is_some() {
base::genfstab();
} else {
println!("Running TUI installer");
}

Loading…
Cancel
Save