From 5bbb3ab3d2acfb2cfb9e7ccb1b19a3979f16e032 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 2 Nov 2019 00:03:50 +0100 Subject: [PATCH] Add kernel and firmware selection --- archfi | 36 ++++++++++++++++++++++++++++++++---- lng/English | 1 + lng/French | 1 + 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/archfi b/archfi index 26c0cc0..15b4673 100644 --- a/archfi +++ b/archfi @@ -726,7 +726,8 @@ installmenu(){ fi options=() options+=("${txteditmirrorlist}" "(${txtoptional})") - options+=("${txtinstallarchlinux}" "pacstrap base linux") + options+=("${txtinstallarchlinux}" "pacstrap base kernel") + options+=("${txtinstallfirmware}" "(${txtoptional}) pacstrap linux-firmware") options+=("${txtconfigarchlinux}" "") sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ "${options[@]}" \ @@ -738,7 +739,12 @@ installmenu(){ nextitem="${txtinstallarchlinux}" ;; "${txtinstallarchlinux}") - installbase + if(installbase) then + nextitem="${txtinstallfirmware}" + fi + ;; + "${txtinstallfirmware}") + installfirmware nextitem="${txtconfigarchlinux}" ;; "${txtconfigarchlinux}") @@ -754,8 +760,29 @@ installmenu(){ installbase(){ clear - echo "pacstrap /mnt base linux" - pacstrap /mnt base linux + pkgs="base" + options=() + options+=("linux" "") + options+=("linux-lts" "") + options+=("linux-zen" "") + options+=("linux-hardened" "") + sel=$(whiptail --backtitle "${apptitle}" --title "Kernel" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + pkgs+=" ${sel}" + else + return 1 + fi + echo "pacstrap /mnt ${pkgs}" + pacstrap /mnt ${pkgs} + pressanykey +} + +installfirmware(){ + clear + echo "pacstrap /mnt linux-firmware" + pacstrap /mnt linux-firmware pressanykey } @@ -1721,6 +1748,7 @@ loadstrings(){ txteditmirrorlist="Edit mirrorlist" txtinstallarchlinux="Install Arch Linux" + txtinstallfirmware="Install Firmware" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" diff --git a/lng/English b/lng/English index 36c084b..8262d77 100644 --- a/lng/English +++ b/lng/English @@ -60,6 +60,7 @@ txtarchinstallmenu="Arch Install Menu" txteditmirrorlist="Edit mirrorlist" txtinstallarchlinux="Install Arch Linux" +txtinstallfirmware="Install Firmware" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" diff --git a/lng/French b/lng/French index fca0614..6b914d7 100644 --- a/lng/French +++ b/lng/French @@ -60,6 +60,7 @@ txtarchinstallmenu="Menu Installation Arch Linux" txteditmirrorlist="Éditer mirrorlist" txtinstallarchlinux="Installer Arch Linux" +txtinstallfirmware="Installer les firmwares" txtconfigarchlinux="Configurer Arch Linux" txtsethostname="Définir le nom de l'ordinateur"