diff --git a/Amelia.sh b/Amelia.sh index e310475..2d552f2 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -1,7 +1,7 @@ #!/bin/bash # Amelia installer for Archlinux - # Version: 1.2.3 + # Version: 1.2.4 # Source: https://gitlab.com/prism7/archery # Contact: leenooks7@gmail.com @@ -1703,17 +1703,17 @@ dtct_single_gfx() { Enter [Y/n]: " read -r -p " -==> " nvdprop +==> " nvidiaprop - nvdprop="${nvdprop:-y}" - nvdprop="${nvdprop,,}" + nvidiaprop="${nvidiaprop:-y}" + nvidiaprop="${nvidiaprop,,}" - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then sourcetype="Proprietary" - elif [[ "${nvdprop}" == "n" ]]; then + elif [[ "${nvidiaprop}" == "n" ]]; then sourcetype="Open-source" skip - elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then + elif [[ ! "${nvidiaprop}" =~ ^(y|n)$ ]]; then invalid return 1 fi @@ -1777,14 +1777,14 @@ ${nvidiacards} Enter [Y/n]: " read -r -p " -==> " nvdprop +==> " nvidiaprop - nvdprop="${nvdprop:-y}" - nvdprop="${nvdprop,,}" + nvidiaprop="${nvidiaprop:-y}" + nvidiaprop="${nvidiaprop,,}" - if [[ "${nvdprop}" == "n" ]]; then + if [[ "${nvidiaprop}" == "n" ]]; then skip - elif [[ ! "${nvdprop}" =~ ^(y|n)$ ]]; then + elif [[ ! "${nvidiaprop}" =~ ^(y|n)$ ]]; then invalid return 1 fi @@ -1803,7 +1803,7 @@ Enter [Y/n]: " fi if [[ "${nvidiacount}" -ge "1" ]]; then multivendors+=(Nvidia) - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then multisourcetype+=(Proprietary) else multisourcetype+=(Open-source) @@ -1874,7 +1874,7 @@ Enter a number ${bwhite}(empty to skip)${blue}: " fi - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then sleep 0.2 YELLOW " > Select Nvidia driver: " @@ -1989,7 +1989,7 @@ gfxpkgs_set() { fi # Nvidia Graphics - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then # Swap partition|swapfile|zram-swap = yes if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then sleep 0.2 @@ -2025,7 +2025,7 @@ gfxpkgs_set() { elif [[ "${family}" == "2" ]]; then nvidia_aur="y" fi - elif [[ "${nvdprop}" == "n" ]]; then + elif [[ "${nvidiaprop}" == "n" ]]; then gfxpkgs+=(libva-mesa-driver vulkan-nouveau) fi } @@ -5779,7 +5779,7 @@ revise() { revision="y" gfxpkgs=() validpkgs=() - reset=(xbootloader="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" lowlat="" nogsp="" sanity="" partok="" preset="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="" nvidia_aur="" web_aur_url="") + reset=(xbootloader="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" lowlat="" nogsp="" sanity="" partok="" preset="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" hometype="" homeform="" smartpart="" LuksParts="" nvidia_aur="" web_aur_url="") export "${reset[@]}" instl @@ -6145,8 +6145,8 @@ pkg_collection() { [[ "${vendor}" == "Virtual Machine" ]] && basepkgs+=("${vmpkgs}") [[ "${vendor}" != "Virtual Machine" ]] && basepkgs+=(alsa-firmware linux-firmware sof-firmware) [[ "${terminal}" == "y" ]] && basepkgs+=(gnome-terminal) - [[ "${nvdprop}" == "y" ]] && basepkgs+=("${kernel}-headers") - [[ ! "${desktop}" =~ ^(11|12)$ ]] && basepkgs+=(7zip alsa-plugins alsa-utils bluez bluez-hid2hci bluez-obex bluez-utils exfatprogs git glibc-locales gst-libav gst-plugin-libcamera gst-plugin-pipewire gst-plugins-bad gst-plugins-good gst-plugins-ugly libfido2 man-db man-pages mesa-utils nano-syntax-highlighting pacman-contrib pipewire-alsa pipewire-libcamera pipewire-pulse pipewire-zeroconf reflector usb_modeswitch xdg-user-dirs) + [[ "${nvidiaprop}" == "y" ]] && basepkgs+=("${kernel}-headers") + [[ ! "${desktop}" =~ ^(11|12)$ ]] && basepkgs+=(7zip alsa-plugins alsa-utils bluez bluez-hid2hci bluez-obex bluez-utils exfatprogs git glibc-locales gst-libav gst-plugin-libcamera gst-plugin-pipewire gst-plugins-bad gst-plugins-good gst-plugins-ugly libfido2 man-db man-pages mesa-utils nano-syntax-highlighting pacman-contrib pipewire-alsa pipewire-libcamera pipewire-onnx pipewire-pulse pipewire-zeroconf reflector usb_modeswitch xdg-user-dirs) case "${desktop}" in @@ -6205,7 +6205,7 @@ pkg_collection() { [[ -n "${print_pkgs}" ]] && custarray+=("${print_pkgs}") [[ "${vendor}" == "Virtual Machine" ]] && custarray+=("${vmpkgs}") [[ "${vendor}" != "Virtual Machine" ]] && custarray+=(linux-firmware) - [[ "${nvdprop}" == "y" ]] && custarray+=("${kernel}-headers") + [[ "${nvidiaprop}" == "y" ]] && custarray+=("${kernel}-headers") [[ "${greeternmbr}" =~ ^(1|2|3)$ ]] && custarray+=("${greeter}") deskpkgs="${custarray[*]}" ;; @@ -6565,7 +6565,7 @@ GRUB_BTRFSD fi fi - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then local stage_prompt="Grub/Nvidia Configuration" if arch-chroot /mnt <<-NVIDIA_GRUB > "${void}" 2>&1 2> "${log}" ; then sed -i "/^#GRUB_TERMINAL_OUTPUT=console/s/^#//" /etc/default/grub || exit @@ -6637,7 +6637,7 @@ ZRAM_CONF ################################################################################################### nvidia_hook() { - if [[ "${nvdprop}" == "y" && -n "${nvname}" ]]; then + if [[ "${nvidiaprop}" == "y" && -n "${nvname}" ]]; then local stage_prompt="Nvidia Hook Creation" if arch-chroot /mnt <<-NVIDIA_HOOK > "${void}" 2>&1 2> "${log}" ; then mkdir -p /etc/pacman.d/hooks/ || exit @@ -7230,7 +7230,7 @@ set_vars() { # LUKS HOOKS SETUP # Nvidia Proprietary GFX Hooks - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then HOOKS+=(systemd keyboard autodetect microcode modconf sd-vconsole block sd-encrypt filesystems) # Open-source GFX Hooks else @@ -7262,7 +7262,7 @@ set_vars() { # HOOKS SETUP # Nvidia Proprietary GFX Hooks - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then HOOKS+=(systemd autodetect microcode modconf keyboard sd-vconsole block filesystems) # Open-source GFX Hooks else @@ -7285,7 +7285,7 @@ set_vars() { gfx_bootopts=() # Nvidia Proprietary - if [[ "${nvdprop}" == "y" ]]; then + if [[ "${nvidiaprop}" == "y" ]]; then MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) gfx_bootopts+=(nvidia.NVreg_UsePageAttributeTable=1) @@ -7302,7 +7302,7 @@ set_vars() { # AMD if [[ "${vendor}" == "AMD" || "${vendors}" =~ "AMD" ]]; then - if [[ -n "${islands}" && -z "${nvdprop}" ]]; then + if [[ -n "${islands}" && -z "${nvidiaprop}" ]]; then MODULES+=(amdgpu radeon) fi # 'Southern Islands' support @@ -7484,7 +7484,7 @@ CUSTOM_SRVC log="Amelia.log" disks="$(lsblk --nodeps --paths --noheadings --output=name,size,model | cat --number)" trg="" - vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="" nvidia_aur="" web_aur_url="") + vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvidiaprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="" nvidia_aur="" web_aur_url="") export "${vars[@]}" validpkgs=() sleep 0.2