added iso gui option
This commit is contained in:
parent
e794bef718
commit
5c4945de60
4 changed files with 39 additions and 6 deletions
|
@ -54,6 +54,25 @@ pub fn uncomment_first_value_of(value: &str, file: &str) {
|
|||
std::fs::write(file, new).unwrap();
|
||||
}
|
||||
|
||||
pub fn uncomment_tag(tag: &str, file: &str) {
|
||||
// read in the file
|
||||
let content = std::fs::read_to_string(file).unwrap();
|
||||
let mut new = String::new();
|
||||
|
||||
// search for the first instance of `value` in the file
|
||||
// uncomment the '#' symbol if there is one
|
||||
for line in content.lines() {
|
||||
if line.starts_with(tag) {
|
||||
new.push_str(&format!("{}\n", line.trim_start_matches(tag)));
|
||||
} else {
|
||||
new.push_str(&format!("{line}\n"));
|
||||
}
|
||||
}
|
||||
|
||||
// write back
|
||||
std::fs::write(file, new).unwrap();
|
||||
}
|
||||
|
||||
pub fn install(conf: InstallConfig) {
|
||||
// Drive Setup
|
||||
format_drives(&conf.drive, conf.general.encryption);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue