added iso gui option
This commit is contained in:
parent
e794bef718
commit
5c4945de60
4 changed files with 39 additions and 6 deletions
|
@ -1,7 +1,9 @@
|
|||
use crate::{install::str_vec, is_root, run_command};
|
||||
use crate::{
|
||||
install::{str_vec, uncomment_tag},
|
||||
is_root, run_command,
|
||||
};
|
||||
|
||||
// TODO : Make GUI in install medium optional with arg `--with-gui`
|
||||
pub fn create_iso() {
|
||||
pub fn create_iso(without_gui: bool) {
|
||||
if !is_root() {
|
||||
eprintln!("Error: You need root to create an ISO");
|
||||
std::process::exit(1);
|
||||
|
@ -12,6 +14,13 @@ pub fn create_iso() {
|
|||
run_command(&cmd, None, false);
|
||||
}
|
||||
|
||||
if without_gui {
|
||||
std::fs::remove_file("./iso/airootfs/etc/systemd/system/display-manager.service").unwrap();
|
||||
} else {
|
||||
println!("Adding GUI packages");
|
||||
uncomment_tag("#gui: ", "./iso/packages.x86_64");
|
||||
}
|
||||
|
||||
std::fs::create_dir_all("./work").unwrap();
|
||||
|
||||
let mount_cmd = str_vec(vec![
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue