fix de issue in config

axtloss/rework-partitioning
axtlos 3 years ago
parent 0d50ec605d
commit 96aaa78850

@ -1,7 +1,7 @@
# Maintainer: Matt C <mdc028[at]bucknell[dot]edu> # Maintainer: Matt C <mdc028[at]bucknell[dot]edu>
pkgname=jade pkgname=jade
pkgver=1.0.3 pkgver=1.0.4
pkgrel=2 pkgrel=2
pkgdesc="Scriptable backend & TUI Installer for Crystal Linux" pkgdesc="Scriptable backend & TUI Installer for Crystal Linux"
arch=('x86_64') arch=('x86_64')

@ -13,7 +13,7 @@ struct Config {
networking: Networking, networking: Networking,
users: Vec<Users>, users: Vec<Users>,
rootpass: String, rootpass: String,
desktop: Option<DesktopSetup>, desktop: String,
timeshift: bool, timeshift: bool,
flatpak: bool, flatpak: bool,
extra_packages: Vec<String>, extra_packages: Vec<String>,
@ -137,8 +137,20 @@ pub fn read_config(configpath: PathBuf) {
users::root_pass(config.rootpass.as_str()); users::root_pass(config.rootpass.as_str());
println!(); println!();
log::info!("Installing desktop : {:?}", config.desktop); log::info!("Installing desktop : {:?}", config.desktop);
if let Some(desktop) = &config.desktop { /*if let Some(desktop) = &config.desktop {
desktops::install_desktop_setup(*desktop); desktops::install_desktop_setup(*desktop);
}*/
match config.desktop.as_str() {
"onyx" => desktops::install_desktop_setup(DesktopSetup::Onyx),
"plasma" => desktops::install_desktop_setup(DesktopSetup::Kde),
"mate" => desktops::install_desktop_setup(DesktopSetup::Mate),
"gnome" => desktops::install_desktop_setup(DesktopSetup::Gnome),
"cinnamon" => desktops::install_desktop_setup(DesktopSetup::Cinnamon),
"xfce" => desktops::install_desktop_setup(DesktopSetup::Xfce),
"budgie" => desktops::install_desktop_setup(DesktopSetup::Budgie),
"enlightenment" => desktops::install_desktop_setup(DesktopSetup::Enlightenment),
"None/DIY" => desktops::install_desktop_setup(DesktopSetup::None),
_ => log::info!("No desktop setup selected!"),
} }
println!(); println!();
log::info!("Enabling timeshift : {}", config.timeshift); log::info!("Enabling timeshift : {}", config.timeshift);

Loading…
Cancel
Save