diff --git a/Amelia.sh b/Amelia.sh index 4f4fb60..ea0234e 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -2,7 +2,7 @@ # Amelia Installer # Source: https://gitlab.com/prism7/archery -# Version: 9.7.1 +# Version: 9.8.0 set -euo pipefail ################################################################################################### @@ -12,18 +12,20 @@ red="\e[31m" cyan="\e[36m" blue="\e[94m" green="\e[32m" +redl="\e[1;31m" yellow="\e[33m" -magenta="\e[35m" -yellowl="\e[93m" +cyanl="\e[1;36m" redbg="\e[1;41m" +magenta="\e[35m" bwhite="\e[0;97m" cyanbg="\e[1;46m" bluebg="\e[1;44m" +greenl="\e[1;32m" greenbg="\e[1;42m" -yellowbg="\e[1;43m" +yellowl="\e[1;33m" +magental="\e[1;35m" magentabg="\e[1;45m" MAGENTABG() { echo -e "${magentabg} $1${nc}" ;} -YELLOWBG() { echo -e "${yellowbg} $1${nc}" ;} YELLOWL() { echo -e "${yellowl} $1${nc}" ;} GREENBG() { echo -e "${greenbg} $1${nc}" ;} MAGENTA() { echo -e "${magenta} $1${nc}" ;} @@ -70,21 +72,21 @@ deskname() { sleep 0.2 YELLOW " - ### ${nc}${desktopname} ${yellow}has been selected + ### ${desktopname} has been selected " } vm() { sleep 0.2 - RED " - ---------------------------------- - ### ${yellow}Virtual Machine detected ${red}### - ----------------------------------" + CYAN " + + >> ${yellowl}Virtual Machine ${nc}detected + " } invalid() { sleep 0.2 RED " -------------------------- - ### ${yellow}Invalid Response ${red}### + ### ${nc}Invalid Response ${red}### --------------------------" reload } @@ -92,7 +94,7 @@ err_try() { sleep 0.2 RED " -------------------------------------------- - ### ${yellow}Errors occured. Please try again.. ${red}### + ### ${nc}Errors occured. Please try again.. ${red}### --------------------------------------------" reload } @@ -100,7 +102,7 @@ err_abort() { sleep 0.2 RED " ------------------------ - ### ${yellow}Errors occured ${red}### + ### ${nc}Errors occured ${red}### ------------------------" failure } @@ -109,7 +111,7 @@ reboot() { sleep 0.2 RED " ------------------------------------------------------------------- - ### ${yellow}The system will now ${nc}reboot ${yellow}for all changes to take effect ${red}### + ### ${nc}The system will now ${yellow}reboot ${nc}for all changes to take effect ${red}### ------------------------------------------------------------------- @@ -122,7 +124,7 @@ force_reboot() { sleep 0.2 RED " ---------------------------------------------------------------- - ### ${yellow}A reboot is mandatory after performing LUKS encryption ${red}### + ### ${nc}A reboot is ${yellow}mandatory ${nc}after performing LUKS encryption ${red}### ---------------------------------------------------------------- @@ -162,7 +164,7 @@ ${magenta}###${nc}-----------------------------------${magenta}[ ${bwhite}Unmoun RED " ----------------------------- - ### ${yellow}Unmounting Failed.. ${red}### + ### ${nc}Unmounting Failed.. ${red}### -----------------------------" failure fi @@ -182,7 +184,7 @@ choice() { sleep 0.2 RED " -------------------------------------------- - ### ${yellow}Please make a choice to continue.. ${red}### + ### ${nc}Please make a choice to continue.. ${red}### --------------------------------------------" reload } @@ -190,7 +192,7 @@ y_n() { sleep 0.2 RED " ---------------------------------------------- - ### ${yellow}Please type 'y' or 'n' to continue.. ${red}### + ### ${nc}Please type ${yellow}'y' ${nc}or ${yellow}'n' ${nc}to continue.. ${red}### ----------------------------------------------" reload } @@ -198,7 +200,7 @@ yes_no() { sleep 0.2 RED " ------------------------------------------------- - ### ${yellow}Please type 'yes' or 'no' to continue.. ${red}### + ### ${nc}Please type ${yellow}'yes' ${nc}or ${yellow}'no' ${nc}to continue.. ${red}### -------------------------------------------------" reload } @@ -219,7 +221,7 @@ stage_fail() { sleep 0.2 NC " -==> [${red}[!] ${stage_prompt} FAILED!${nc}] +==> [${red}[!] ${stage_prompt} ${yellow}FAILED!${nc}] " failure } @@ -230,7 +232,7 @@ completion_err() { - (*) ${nc}Please complete${yellowl} '${stage_prompt}' ${nc}to continue + >> ${nc}Please complete ${bwhite}'${stage_prompt}' ${nc}to continue " | pv -qL 70 else sleep 0.2 @@ -238,7 +240,7 @@ completion_err() { - (*) ${nc}Please complete${yellowl} '${stage_prompt}' ${nc}to continue + >> ${nc}Please complete ${bwhite}'${stage_prompt}' ${nc}to continue " fi } @@ -461,7 +463,7 @@ ${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}UEFI Mod else RED " -------------------------- - ### ${yellow}Not in UEFI Mode ${red}### + ### ${nc}Not in UEFI Mode ${red}### --------------------------" failure fi @@ -483,7 +485,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Internet ---------------------------------------------------------------------- - ### ${yellow}A connection to ${nc}'www.archlinux.org' ${yellow}could not be established ${red}### + ### ${nc}A connection to ${yellow}'www.archlinux.org' ${nc}could not be established ${red}### ---------------------------------------------------------------------- " failure @@ -503,6 +505,7 @@ ${magenta}###${nc}-----------------------------------${magenta}[ ${bwhite}System " sleep 0.2 timedatectl + echo ok } ################################################################################################### @@ -558,21 +561,21 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Machi sleep 0.2 YELLOW " - ### This system is a(n) ${nc}${hardw_model} ${yellow}${machine} + ### This system is a(n): ${hardw_model} ${machine} - ### The ${nc}${cpu_name} ${yellow}cpu microcode will be installed + ### The ${cpu_name} cpu microcode will be installed " else sleep 0.2 YELLOW " - ### This system is a(n) ${nc}${hardw_model} ${yellow}${hardw_vendor} ${machine} + ### This system is a(n): ${hardw_model} ${hardw_vendor} ${machine} - ### The ${nc}${cpu_name} ${yellow}cpu microcode will be installed + ### The ${cpu_name} cpu microcode will be installed " fi ok @@ -592,13 +595,13 @@ ${magenta}###${nc}----------------------------------------${magenta}[ ${bwhite}M if [[ -e /usr/bin/pv ]]; then CYAN " - * ${nc}Select ${bwhite}[4] ${nc}for ${yellowl}Auto-Navigation - " | pv -qL 70 + >> ${nc}Select ${bwhite}[4] ${nc}for ${yellowl}Auto-Navigation ${nc}Mode " | pv -qL 70 + echo else - CYAN " + CYAN " - * ${nc}Select ${bwhite}[4] ${nc}for ${yellowl}Auto-Navigation - " + >> ${nc}Select ${bwhite}[4] ${nc}for ${yellowl}Auto-Navigation ${nc}Mode " + echo fi NC " @@ -630,7 +633,7 @@ Enter a number: " sleep 0.2 RED " --------------------------------- - ### ${yellow}Please select a Submenu ${red}### + ### ${nc}Please select a Submenu ${red}### ---------------------------------" reload return 1 ;; @@ -678,7 +681,8 @@ Enter a number: " until rootuser_setup; do : ; done until slct_hostname; do : ; done return 1 ;; - 3) until slct_shell; do : ; done + 3) + until slct_shell; do : ; done return 1 ;; "") until main_menu; do : ; done ;; @@ -704,11 +708,10 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Local ### [Enter ${nc}'l'${yellow} to list locales, then ${nc}'enter'${yellow} to search or ${nc}'q'${yellow} to quit] " - RED " + CYAN " - --------------------------------- - ### ${yellow}Exclude ${nc}'.UTF_8' ${yellow}suffix ${red}### - ---------------------------------" + >> ${nc}Exclude ${yellowl}'.UTF_8' ${nc}suffix + " BLUE " @@ -758,7 +761,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Keyboard RED " ------------------------------------------- - ### ${yellow}No ${nc}'tty' ${yellow}(Linux console) detected ${red}### + ### ${nc}No 'tty' (Linux console) detected ${red}### -------------------------------------------" YELLOW " @@ -828,7 +831,7 @@ Enter a username: " sleep 0.2 RED " --------------------------------------------- - ### ${yellow}Please enter a username to continue ${red}### + ### ${nc}Please enter a username to continue ${red}### ---------------------------------------------" reload return 1 @@ -844,7 +847,7 @@ Enter a password for${nc} ${cyan}${USERNAME}${blue}: " sleep 0.2 RED " --------------------------------------------- - ### ${yellow}Please enter a password to continue ${red}### + ### ${nc}Please enter a password to continue ${red}### ---------------------------------------------" reload return 1 @@ -860,7 +863,7 @@ Re-enter${nc} ${cyan}${USERNAME}'s ${blue}password: " sleep 0.2 RED " --------------------------------------------------- - ### ${yellow}Passwords don't match. Please try again.. ${red}### + ### ${nc}Passwords don't match. Please try again.. ${red}### ---------------------------------------------------" reload return 1 @@ -869,7 +872,7 @@ Re-enter${nc} ${cyan}${USERNAME}'s ${blue}password: " sleep 0.2 RED " --------------------------------------------------- - ### ${yellow}Please enter a valid username to continue ${red}### + ### ${nc}Please enter a valid username to continue ${red}### ---------------------------------------------------" reload return 1 @@ -897,7 +900,7 @@ Enter a password for the${nc}${cyan} Root ${blue}user: " sleep 0.2 RED " --------------------------------------------------------------- - ### ${yellow}Please enter a password for the Root user to continue ${red}### + ### ${nc}Please enter a password for the Root user to continue ${red}### ---------------------------------------------------------------" reload return 1 @@ -913,7 +916,7 @@ Re-enter${nc} ${cyan}Root ${blue}user's password: " sleep 0.2 RED " --------------------------------------------------- - ### ${yellow}Passwords don't match. Please try again.. ${red}### + ### ${nc}Passwords don't match. Please try again.. ${red}### ---------------------------------------------------" reload return 1 @@ -941,7 +944,7 @@ Enter a hostname: " sleep 0.2 RED " --------------------------------------------- - ### ${yellow}Please enter a hostname to continue ${red}### + ### ${nc}Please enter a hostname to continue ${red}### ---------------------------------------------" reload return 1 @@ -949,7 +952,7 @@ Enter a hostname: " sleep 0.2 RED " ---------------------------------------------------- - ### ${yellow}Lowercase is preferred. Please try again.. ${red}### + ### ${nc}Lowercase is preferred. Please try again.. ${red}### ----------------------------------------------------" reload return 1 @@ -1004,7 +1007,7 @@ Enter a number: " sleep 0.2 RED " ------------------------------- - ### ${yellow}Please select a Shell ${red}### + ### ${nc}Please select a Shell ${red}### -------------------------------" reload return 1 ;; @@ -1124,7 +1127,7 @@ Enter a number: " kernelname="Linux LTS" ;; 3) CYAN " - (*) ${nc}System Hibernation is ${yellowl}NOT SUPPORTED ${nc}by kernel + >> ${nc}System Hibernation is ${yellowl}not supported ${nc}by this kernel " kernel="linux-hardened" kernelname="Linux Hardened" ;; @@ -1135,7 +1138,7 @@ Enter a number: " sleep 0.2 RED " -------------------------------- - ### ${yellow}Please select a Kernel ${red}### + ### ${nc}Please select a Kernel ${red}### --------------------------------" reload return 1 ;; @@ -1162,7 +1165,7 @@ ${magenta}###${nc}-----------------------------------${magenta}[ ${bwhite}Secure " YELLOW " - > Sign UKI(s), Kernel & binaries for use with ${nc}Secure Boot ${yellow}? [y/N]" + > Sign UKI(s), Kernel & binaries for use with Secure Boot ? [y/N]" BLUE " @@ -1177,13 +1180,13 @@ Enter [y/N]: " if [[ "${sb_sign}" == "y" ]]; then local prompt="Secure Boot 'Setup' Mode Verification" SB_Status="$(bootctl status 2> "${void}" | grep -E 'Secure Boot' | awk "{print \$4}")" - if [[ ${SB_Status} == "(setup)" ]]; then + if [[ "${SB_Status}" == "(setup)" ]]; then ok else sleep 0.2 RED " ----------------------------------------- - ### ${yellow}Secure Boot Not in 'Setup' Mode ${red}### + ### ${nc}Secure Boot Not in ${yellow}'Setup' ${nc}Mode ${red}### -----------------------------------------" failure fi @@ -1197,7 +1200,7 @@ Enter [y/N]: " YELLOW " - > Create an additional bootloader ${nc}Rescue ${yellow}entry (for troubleshooting) ? [Y/n]" + > Create an additional bootloader Rescue entry (for troubleshooting) ? [Y/n]" BLUE " @@ -1273,7 +1276,7 @@ Enter a number: " sleep 0.2 RED " ------------------------------------ - ### ${yellow}Please select a Bootloader ${red}### + ### ${nc}Please select a Bootloader ${red}### ------------------------------------" reload return 1 ;; @@ -1330,7 +1333,7 @@ Enter a number: " sleep 0.2 RED " ------------------------------------ - ### ${yellow}Please select a Mountpoint ${red}### + ### ${nc}Please select a Mountpoint ${red}### ------------------------------------" reload return 1 ;; @@ -1382,7 +1385,7 @@ Enter a number: " - > Make use of a ${nc}dedicated ${yellow}/Home Partition ? [y/N] " + > Make use of a dedicated /Home Partition ? [y/N] " BLUE " @@ -1426,7 +1429,7 @@ Enter [y/N]: " YELLOW " - > Label your Btrfs ${nc}snapshots ${yellow}directory: " + > Label your Btrfs snapshots directory: " BLUE " @@ -1443,7 +1446,7 @@ Enter a name: " sleep 0.2 RED " ------------------------------------ - ### ${yellow}Please select a Filesystem ${red}### + ### ${nc}Please select a Filesystem ${red}### ------------------------------------" reload return 1 ;; @@ -1506,8 +1509,7 @@ Enter a number: " until set_swapsize; do : ; done ;; 3) CYAN " - (*) ${nc}Hibernating to Swap on Zram is ${yellowl}NOT SUPPORTED - " + >> ${nc}Hibernating to Swap on Zram is ${yellowl}not supported${nc} " zram="zram-generator" YELLOW " @@ -1546,7 +1548,7 @@ Enter Swap size ${bwhite}(in GB)${blue}: " sleep 0.2 RED " ------------------------------------------ - ### ${yellow}Please enter a value to continue ${red}### + ### ${nc}Please enter a value to continue ${red}### ------------------------------------------" reload line2 @@ -1557,7 +1559,7 @@ Enter Swap size ${bwhite}(in GB)${blue}: " sleep 0.2 RED " --------------------------------------------- - ### ${yellow}Please use only integers as a value ${red}### + ### ${nc}Please use only integers as a value ${red}### ---------------------------------------------" reload line2 @@ -1625,7 +1627,7 @@ dtct_single_gfx() { sleep 0.2 RED " ---------------------------------------------------- - ### ${yellow}Only for NV110 ${nc}(Maxwell) ${yellow}Graphics or newer ${red}### + ### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}### ----------------------------------------------------" fi YELLOW " @@ -1756,7 +1758,7 @@ Enter a number: " [1] Intel ${red}----------------------------------------------------${nc} - [2] Nvidia ${red}### ${yellow}Only for NV110 ${nc}(Maxwell) ${yellow}Graphics or newer ${red}###${nc} + [2] Nvidia ${red}### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###${nc} ${red}----------------------------------------------------${nc} [3] Both @@ -1790,7 +1792,7 @@ Enter a number: " [1] Amd ${red}----------------------------------------------------${nc} - [2] Nvidia ${red}### ${yellow}Only for NV110 ${nc}(Maxwell) ${yellow}Graphics or newer ${red}###${nc} + [2] Nvidia ${red}### ${nc}Only for NV110 ${yellow}(Maxwell) ${nc}Graphics or newer ${red}###${nc} ${red}----------------------------------------------------${nc} [3] Both @@ -2011,13 +2013,13 @@ gfxpkgs_set() { # Swap partition|swapfile|zram-swap = yes if [[ "${swapmode}" =~ ^(1|2|3)$ ]]; then sleep 0.2 - RED " + CYAN " ---------------------------------------------------------------- - ### ${yellowl}INFO: ${nc}${yellow}When ${nc}Hibernating ${red}### + ### ${yellowl}INFO: ${nc}When Hibernating ${cyan}### - ### ${yellow}Nvidia's ${nc}'Preserve Video Memory after suspend' ${yellow}feature ${red}### + ### ${nc}Nvidia's ${yellowl}'Preserve Video Memory after suspend' ${nc}feature ${cyan}### - ### ${yellow}is incompatible with ${nc}'Early KMS' ${yellow}use ${red}### + ### ${nc}is incompatible with ${yellowl}'Early KMS' ${nc}use ${cyan}### ----------------------------------------------------------------" NC " @@ -2258,7 +2260,7 @@ Enter any additional packages ${bwhite}(space-seperated)${blue}: " sleep 0.2 RED " --------------------------------------------- - ### ${yellow}Please enter package(s) to continue ${red}### + ### ${nc}Please enter package(s) to continue ${red}### ---------------------------------------------" reload return 1 @@ -2358,11 +2360,11 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}'base-dev YELLOW " - ### NOTE: The ${nc}'base' ${yellow}meta-package does not include the tools needed for building packages + ### NOTE: The 'base' meta-package does not include the tools needed for building packages - > Install ${nc}'base-devel' ${yellow}meta-package ? [Y/n] " + > Install 'base-devel' meta-package ? [Y/n] " BLUE " @@ -2403,7 +2405,7 @@ ${magenta}###${nc}----------------------------------${magenta}[ ${bwhite}Web bro - > Select ${nc}Web Browser ${yellow}to install " + > Select Web Browser to install " NC " [1] Firefox @@ -2466,8 +2468,9 @@ Enter a number ${bwhite}(empty to skip)${blue}: " else sleep 0.2 RED " + ----------------------------------------- - ### ${yellow}Incompatible Selection detected ${red}### + ### ${nc}Incompatible Selection detected ${red}### -----------------------------------------" sleep 0.2 YELLOW " @@ -2517,7 +2520,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Printer & - > Enable ${nc}Printer & Scanner ${yellow}support ? [Y/n] " + > Enable Printer & Scanner support ? [Y/n] " BLUE " @@ -2549,7 +2552,7 @@ Enter [Y/n]: " sleep 0.2 RED " ----------------------------------------- - ### ${yellow}Incompatible Selection detected ${red}### + ### ${nc}Incompatible Selection detected ${red}### -----------------------------------------" sleep 0.2 YELLOW " @@ -2570,6 +2573,7 @@ Enter [Y/n]: " read -r -s -n 1 fi else + echo vm print_pkgs="" skip @@ -2613,7 +2617,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}EFI Boot Enter a Boot Entry number for Deletion ${bwhite}(empty to skip)${blue}: -${cyan}Entries: ${yellow}${entrnmbr} " +${cyan}Entries: ${yellowl}${entrnmbr} " read -r -p " ==> " boot_entry @@ -2622,7 +2626,7 @@ ${cyan}Entries: ${yellow}${entrnmbr} " sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload until sys_submn; do : ; done @@ -2768,11 +2772,11 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Custom K YELLOW " - ### ${nc}Custom ${yellow}Kernel Parameters can be set at boot time + ### Custom Kernel Parameters can be set at boot time - > Enter your ${nc}own ${yellow}additional Kernel Parameters to be ${nc}added ${yellow}to the Kernel Cmdline ? [y/N] " + > Enter your own additional Kernel Parameters to be added to the Kernel Cmdline ? [y/N] " BLUE " @@ -2835,11 +2839,11 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Syste ### and intervenes if it notices any strange behaviour or malfunctions - ### [Applicable for ${nc}non mission-critical ${yellow}platforms such as desktops & laptops] + ### [Applicable for non mission-critical platforms such as desktops & laptops] - > Disable ${nc}Watchdogs ${yellow}in the installed system ? [y/N] " + > Disable Watchdogs in the installed system ? [y/N] " BLUE " @@ -2874,7 +2878,7 @@ ${magenta}###${nc}----------------------------------${magenta}[ ${bwhite}General YELLOW " - ### General ${nc}System Optimizations ${yellow}are available + ### General System Optimizations are available ### Type ${nc}'v' ${yellow}to view a summary @@ -2936,7 +2940,7 @@ ${magenta}###${nc}----------------------------${magenta}[ ${bwhite}Wireless Regu - > Select your Country Code (e.g. ${nc}US${yellow}) + > Select your Country Code (e.g. US) @@ -2952,8 +2956,8 @@ Enter your Country Code, ie:${nc} ${cyan}US ${bwhite}(empty to skip)${blue}: " if [[ -z "${REGDOM}" ]]; then skip - elif [[ "${REGDOM}" == "l" ]]; then - sed 's|^#WIRELESS_REGDOM=||g' /etc/conf.d/wireless-regdom |sed 's|"||g'| less + elif [[ "${REGDOM}" == "L" ]]; then + sed 's|^#WIRELESS_REGDOM=||g' /etc/conf.d/wireless-regdom | sed 's|"||g'| less return 1 elif ! grep \""${REGDOM}"\" /etc/conf.d/wireless-regdom > "${void}" 2>&1 ; then invalid @@ -2988,12 +2992,10 @@ ${magenta}###${nc}-----------------------------------${magenta}[ ${bwhite}System - > Enable ${nc}'systemd-oomd' ${yellow} ? [y/N] " - RED " + > Enable 'systemd-oomd' ? [y/N] " + CYAN " - ------------------------------------------------------------------------ - ### ${yellow}Swapping enabled is ${nc}highly recommended ${yellow}for optimal performance ${red}### - ------------------------------------------------------------------------" + >> ${nc}Swapping enabled is ${yellowl}highly recommended ${nc}for optimal performance " BLUE " @@ -3013,7 +3015,7 @@ Enter [y/N]: " elif [[ "${oomd}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3038,7 +3040,7 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Irqba - > Install & enable ${nc}'irqbalance' ${yellow} ? [y/N] " + > Install & enable 'irqbalance' ? [y/N] " BLUE " @@ -3058,7 +3060,7 @@ Enter [y/N]: " elif [[ "${irqbalance}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3083,7 +3085,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Ther - > Install & enable ${nc}'thermald' ${yellow} ? [y/N] " + > Install & enable 'thermald' ? [y/N] " BLUE " @@ -3103,7 +3105,7 @@ Enter [y/N]: " elif [[ "${thermald}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3128,7 +3130,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Rng- - > Install & enable ${nc}'rngd' ${yellow} ? [y/N] " + > Install & enable 'rngd' ? [y/N] " BLUE " @@ -3148,7 +3150,7 @@ Enter [y/N]: " elif [[ "${rngd}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3173,7 +3175,7 @@ ${magenta}###${nc}---------------------------------------${magenta}[ ${bwhite}Rt - > Install & enable ${nc}'rtkit' ${yellow} ? [y/N] " + > Install & enable 'rtkit' ? [y/N] " BLUE " @@ -3193,7 +3195,7 @@ Enter [y/N]: " elif [[ "${rtkit}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3218,7 +3220,7 @@ ${magenta}###${nc}----------------------------------------${magenta}[ ${bwhite}T - > Install & enable ${nc}'tlp' ${yellow} ? [y/N] " + > Install & enable 'tlp' ? [y/N] " BLUE " @@ -3238,7 +3240,7 @@ Enter [y/N]: " elif [[ "${tlp}" == "n" ]]; then skip else - y_n + invalid return 1 fi ok @@ -3332,7 +3334,7 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " fi if [[ -e "${gptdrive}" ]]; then - parttable="$(fdisk -l "${gptdrive}" 2> ${void} | grep '^Disklabel type' | awk "{print \$3}")" + parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")" if [[ "${parttable}" == "gpt" ]]; then sleep 0.2 NC " @@ -3342,15 +3344,15 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " elif [[ "${parttable}" != "gpt" && -z "${install}" ]]; then sleep 0.2 RED " - --------------------------------------- - ### ${yellow}No GPT found on selected disk ${red}### - ---------------------------------------" + ------------------------------------------ + ### ${nc}No GPT detected on selected disk ${red}### + ------------------------------------------" fi if [[ "${run_as}" != "root" ]]; then sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload until dsks_submn; do : ; done @@ -3375,9 +3377,9 @@ Enter a number: " echo if [[ "${gptslct}" == "1" ]]; then - sgdisk -Z "${gptdrive}" > ${void} && - sgdisk -o "${gptdrive}" > ${void} && - parttable="$(fdisk -l "${gptdrive}" 2> ${void} | grep '^Disklabel type' | awk "{print \$3}")" + sgdisk -Z "${gptdrive}" > "${void}" && + sgdisk -o "${gptdrive}" > "${void}" && + parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")" if [[ "${parttable}" == "gpt" ]]; then gptok="yes" sleep 0.2 @@ -3396,9 +3398,9 @@ Enter a number: " gptok="no" sleep 0.2 RED " - --------------------------------------- - ### ${yellow}No GPT found on selected disk ${red}### - ---------------------------------------" + ------------------------------------------ + ### ${nc}No GPT detected on selected disk ${red}### + ------------------------------------------" reload return 1 fi @@ -3412,7 +3414,7 @@ Enter a number: " ______________________________________________ " gdisk "${gptdrive}" - parttable="$(fdisk -l "${gptdrive}" 2> ${void} | grep '^Disklabel type' | awk "{print \$3}")" + parttable="$(fdisk -l "${gptdrive}" 2> "${void}" | grep '^Disklabel type' | awk "{print \$3}")" if [[ "${parttable}" == "gpt" ]]; then gptok="yes" sleep 0.2 @@ -3433,9 +3435,9 @@ ______________________________________________ RED " - --------------------------------------- - ### ${yellow}No GPT found on selected disk ${red}### - ---------------------------------------" + ------------------------------------------ + ### ${nc}No GPT detected on selected disk ${red}### + ------------------------------------------" reload return 1 fi @@ -3473,20 +3475,17 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Multi YELLOW " - > Are you ${nc}Dual/Multi-Booting ${yellow}with other OS's ? [y/n] + > Are you Dual/Multi-Booting with other OS's ? [y/n] ### If ${nc}'(y)es'${yellow} then: " CYAN " - ---------------------------------------------------------- - ### ${yellowl}Your ${bwhite}EFI ${yellowl}System Partition (ESP) will stay ${bwhite}intact ${nc}${cyan}### - ---------------------------------------------------------- + >> ${nc}Your ${yellowl}EFI ${nc}System Partition (ESP) will stay ${yellowl}intact${nc}${cyan} - ----------------------------------------------------------------------------- - ### ${yellowl}Only ${bwhite}Manual ${yellowl}Disk Partitioning will be available for ${bwhite}Disk Management ${nc}${cyan}### - -----------------------------------------------------------------------------" + >> ${nc}Only ${yellowl}Manual ${nc}Disk Partitioning will be available for ${yellowl}Disk Management + " BLUE " @@ -3555,7 +3554,7 @@ Enter a number: " sleep 0.2 RED " ------------------------------ - ### ${yellow}Please select a Mode ${red}### + ### ${nc}Please select a Mode ${red}### ------------------------------" reload return 1 ;; @@ -3589,17 +3588,17 @@ ${magenta}###${nc}---------------------------------${magenta}[ ${bwhite}Automati sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload - until dsks_submn; do : ; done + until main_menu; do : ; done return 0 fi sleep 0.2 NC " - ----------------------------------------------------------- - ${cyan}>> ${nc}Apply ${yellowl}'Smart Partitioning' ${nc}on disk ${bwhite}'${instl_drive}'${nc} ? ${cyan}[Y/n]${nc} - ----------------------------------------------------------- + ------------------------------------------------------------ + ${cyan}>>> ${nc}Apply ${yellowl}'Smart Partitioning' ${nc}on disk ${bwhite}'${instl_drive}'${nc} ? ${cyan}[Y/n]${nc} + ------------------------------------------------------------ " read -r -p " ==> " smartpart @@ -3648,7 +3647,7 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload until dsks_submn; do : ; done @@ -3752,7 +3751,11 @@ Enter a Preset number ${bwhite}(empty to skip)${blue}: " } ################################################################################################### set_partsize() { - + + if [[ "${partok}" == "y" ]]; then + return 0 + fi + if [[ "${preset}" =~ ^(3|4)$ ]]; then sleep 0.2 YELLOW " @@ -3761,12 +3764,12 @@ set_partsize() { ### Total detected capacity of disk ${nc}${sgdrive} ${yellow}is ${nc}${cap_gib} GiB${yellow} - ### Default ${nc}Root${yellow} partition's size is aprox. ${nc}25%${yellow} of total disk capacity + ### ${nc}Default ${yellow}Root partition's size is aprox. ${nc}25%${yellow} of total disk capacity - ### Current ${nc}Root${yellow} partition's size is ${nc}[${rootsize} GiB]${yellow} + ### ${nc}Current ${yellow}Root partition's size is ${nc}[${rootsize} GiB]${yellow} - > ${nc}Adjust ${yellow}Root Partition's size (by setting a custom ${nc}% ${yellow}value) ? " + > Adjust Root Partition's size (by setting a custom ${nc}% ${yellow}value) ? " BLUE " @@ -3779,7 +3782,7 @@ Enter ${nc}% ${blue}value ${nc}eg. 40 ${bwhite}(empty to skip)${blue}: " sleep 0.2 RED " ------------------------------------------- - ### ${yellow}Please use only digits as a value ${red}### + ### ${nc}Please use only digits as a value ${red}### -------------------------------------------" reload return 1 @@ -3800,7 +3803,7 @@ Enter ${nc}% ${blue}value ${nc}eg. 40 ${bwhite}(empty to skip)${blue}: " sleep 0.2 RED " ----------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}No space left for other partitions ${red}### + ### ${yellow}WARNING: ${nc}No space left for other partitions ${red}### -----------------------------------------------------" reload return 1 @@ -3913,7 +3916,7 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload until dsks_submn; do : ; done @@ -3933,8 +3936,10 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: " if [[ -z "${sanity}" ]]; then until dsks_submn; do : ; done + return 0 elif [[ "${sanity}" == "no" || "${partok}" == "n" ]]; then until sanity_check; do : ; done + return 0 fi fi done @@ -3971,7 +3976,7 @@ Enter a disk number: " sleep 0.2 RED " ----------------------------------- - ### ${yellow}Root Privileges Missing.. ${red}### + ### ${nc}Root Privileges Missing.. ${red}### -----------------------------------" reload until main_menu; do : ; done @@ -3990,7 +3995,7 @@ Enter a disk number: " sleep 0.2 RED " --------------------------------------- - ### ${yellow}Please create GPT to continue ${red}### + ### ${nc}Please create GPT to continue ${red}### ---------------------------------------" reload until gpt_mngr; do : ; done @@ -3998,9 +4003,9 @@ Enter a disk number: " elif [[ "${parttable}" != "gpt" ]]; then sleep 0.2 RED " - --------------------------------------- - ### ${yellow}No GPT found on selected disk ${red}### - ---------------------------------------" + ------------------------------------------ + ### ${nc}No GPT detected on selected disk ${red}### + ------------------------------------------" reload until gpt_mngr; do : ; done return 0 @@ -4016,7 +4021,12 @@ Enter a disk number: " return 1 fi else - choice + sleep 0.2 + RED " + ----------------------------------------- + ### ${nc}Please select ${yellow}Installation ${nc}Disk ${red}### + -----------------------------------------" + reload return 1 fi } @@ -4052,22 +4062,20 @@ ${magenta}###${nc}--------------------------------------${magenta}[ ${bwhite}San if [[ "${rootcount}" -gt "1" ]]; then local stage_prompt="Selecting Partition" sleep 0.2 - RED " - ---------------------------------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux x86-64 /Root Partitions have been detected ${red}### - ---------------------------------------------------------------------------- + CYAN " + >> ${nc}Multiple ${greenl}Linux x86-64 /Root ${nc}Partitions have been detected " sleep 0.2 - YELLOW " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### + CYAN " +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " NC " - Linux x86-64 /Root Partitions: + ${greenl}Linux x86-64 /Root Partitions:${nc} ------------------------------ ${multi_root} @@ -4094,32 +4102,31 @@ ${multi_root} root_dev="${root_comply}" multiroot_bootopts="root=PARTUUID=$(blkid -s PARTUUID -o value "${root_dev}")" elif [[ "${autoroot}" == "n" ]]; then - stage_fail + until auto_part; do : ; done + return 0 else y_n return 1 fi fi - +#------------------------------------------------------------------------------------------------------------------------------------------------------------------- if [[ "${espcount}" -gt "1" ]]; then local stage_prompt="Selecting Partition" sleep 0.2 - RED " - -------------------------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}Multiple EFI System Partitions have been detected ${red}### - -------------------------------------------------------------------- + CYAN " + >> ${nc}Multiple ${cyanl}EFI System ${nc}Partitions have been detected " sleep 0.2 - YELLOW " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### + CYAN " +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " NC " - Linux EFI System Partitions: + ${cyanl}Linux EFI System Partitions:${nc} ---------------------------- ${multi_esp} @@ -4151,32 +4158,31 @@ ${multi_esp} if [[ "${autoesp}" == "y" ]]; then esp_dev="${esp_comply}" elif [[ "${autoesp}" == "n" ]]; then - stage_fail + until auto_part; do : ; done + return 0 else y_n return 1 fi fi - +#------------------------------------------------------------------------------------------------------------------------------------------------------------------- if [[ "${xbootcount}" -gt "1" ]]; then local stage_prompt="Selecting Partition" sleep 0.2 - RED " - ----------------------------------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux Extended Boot Partitions have been detected ${red}### - ----------------------------------------------------------------------------- + CYAN " + >> ${nc}Multiple ${redl}Linux Extended Boot ${nc}Partitions have been detected " sleep 0.2 - YELLOW " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### + CYAN " +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " NC " - Linux Extended Boot Partitions: + ${redl}Linux Extended Boot Partitions:${nc} ---------------------------- ${multi_xboot} @@ -4202,32 +4208,31 @@ ${multi_xboot} if [[ "${autoxboot}" == "y" ]]; then xboot_dev="${xboot_comply}" elif [[ "${autoxboot}" == "n" ]]; then - stage_fail + until auto_part; do : ; done + return 0 else y_n return 1 fi fi - - if [[ ${fs} == "1" && ${sep_home} == "y" && "${homecount}" -gt "1" ]]; then +#------------------------------------------------------------------------------------------------------------------------------------------------------------------- + if [[ "${fs}" == "1" && "${sep_home}" == "y" && "${homecount}" -gt "1" ]]; then local stage_prompt="Selecting Partition" sleep 0.2 - RED " - --------------------------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux /Home Partitions have been detected ${red}### - --------------------------------------------------------------------- + CYAN " + >> ${nc}Multiple ${magental}Linux /Home ${nc}Partitions have been detected " sleep 0.2 - YELLOW " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### + CYAN " +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " NC " - Linux /Home Partitions: + ${magental}Linux /Home Partitions:${nc} ----------------------- ${multi_home} @@ -4253,32 +4258,31 @@ ${multi_home} if [[ "${autohome}" == "y" ]]; then home_dev="${home_comply}" elif [[ "${autohome}" == "n" ]]; then - stage_fail + until auto_part; do : ; done + return 0 else y_n return 1 fi fi - - if [[ ${swapmode} == "1" && "${swapcount}" -gt "1" ]]; then +#------------------------------------------------------------------------------------------------------------------------------------------------------------------- + if [[ "${swapmode}" == "1" && "${swapcount}" -gt "1" ]]; then local stage_prompt="Selecting Partition" sleep 0.2 - RED " - --------------------------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}Multiple Linux /Swap Partitions have been detected ${red}### - --------------------------------------------------------------------- + CYAN " + >> ${nc}Multiple ${yellowl}Linux /Swap ${nc}Partitions have been detected " sleep 0.2 - YELLOW " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### + CYAN " +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " NC " - Linux /Swap Partitions: + ${yellowl}Linux /Swap Partitions:${nc} ------------------------ ${multi_swap} @@ -4304,14 +4308,14 @@ ${multi_swap} if [[ "${autoswap}" == "y" ]]; then swap_dev="${swap_comply}" elif [[ "${autoswap}" == "n" ]]; then - stage_fail + until auto_part; do : ; done + return 0 else y_n return 1 fi fi -#-------------------------------------------------------------------------------------------------- - +#------------------------------------------------------------------------------------------------------------------------------------------------------------------- if [[ -e "${root_dev}" ]]; then rootpartsize="$(lsblk -dno SIZE --bytes "${root_dev}")" if [[ "${rootpartsize}" -ge "8589934592" ]]; then @@ -4321,22 +4325,22 @@ ${multi_swap} sleep 0.2 RED " ----------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}/Root's size might not be adequate ${red}### + ### ${yellow}WARNING: ${nc}/Root's size might not be adequate ${red}### -----------------------------------------------------" sleep 0.2 RED " ------------------------------------------------------------------------ - ### ${yellow}Depending on the size of your setup, installation might fail ! ${red}### + ### ${nc}Depending on the size of your setup, installation might fail ! ${red}### ------------------------------------------------------------------------" - NC " + NC " ${bwhite}Press any key to continue${nc} - " - read -r -s -n 1 + " + read -r -s -n 1 fi if [[ "${autoroot}" == "y" ]]; then if [[ "${presetpart}" == "y" || "${smartpart}" == "y" ]]; then @@ -4359,7 +4363,7 @@ ${multi_swap} sleep 0.2 RED " --------------------------------------------------- - ### ${yellow}Linux x86-64 /Root Partition not detected ${red}### + ### ${yellow}Linux x86-64 /Root ${nc}Partition not detected ${red}### ---------------------------------------------------" fi #.................................................................................................. @@ -4369,7 +4373,7 @@ ${multi_swap} sleep 0.2 RED " ------------------------------------------- - ### ${yellow}EFI System Partition not detected ${red}### + ### ${yellow}EFI System ${nc}Partition not detected ${red}### -------------------------------------------" fi @@ -4412,7 +4416,7 @@ ${multi_swap} ==> [EFI System Partition ${green}OK${nc}] " else - local prompt="Confirmed EFI System Partition" + local prompt="Confirmed /EFI System Partition" ok fi else @@ -4443,12 +4447,12 @@ ${multi_swap} sleep 0.2 RED " --------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}### + ### ${yellow}WARNING: ${nc}ESP's size is not adequate ${red}### ---------------------------------------------" sleep 0.2 RED " ---------------------------------------------------- - ### ${yellow}Linux Extended Boot Partition not detected ${red}### + ### ${yellow}Linux Extended Boot ${nc}Partition not detected ${red}### ----------------------------------------------------" fi elif [[ "${multibooting}" == "n" ]]; then @@ -4457,7 +4461,7 @@ ${multi_swap} sleep 0.2 RED " --------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}### + ### ${yellow}WARNING: ${nc}ESP's size is not adequate ${red}### ---------------------------------------------" fi elif [[ "${bootloader}" == "2" ]]; then @@ -4467,7 +4471,7 @@ ${multi_swap} sleep 0.2 RED " --------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}ESP's size is not adequate ${red}### + ### ${yellow}WARNING: ${nc}ESP's size is not adequate ${red}### ---------------------------------------------" elif [[ "${espmnt}" == "1" ]]; then espprt="ok" @@ -4479,7 +4483,7 @@ ${multi_swap} ==> [EFI System Partition ${green}OK${nc}] " else - local prompt="Confirmed EFI System Partition" + local prompt="Confirmed /EFI System Partition" ok fi else @@ -4517,7 +4521,7 @@ ${multi_swap} sleep 0.2 RED " -------------------------------------------- - ### ${yellow}Linux /Home Partition not detected ${red}### + ### ${yellow}Linux /Home ${nc}Partition not detected ${red}### --------------------------------------------" fi fi @@ -4547,7 +4551,7 @@ ${multi_swap} sleep 0.2 RED " -------------------------------------------- - ### ${yellow}Linux /Swap Partition not detected ${red}### + ### ${yellow}Linux /Swap ${nc}Partition not detected ${red}### --------------------------------------------" fi fi @@ -4577,16 +4581,16 @@ ${multi_swap} ### ${green}SANITY CHECK OK${nc} ### -----------------------" sleep 0.2 - YELLOW " + CYAN " -###------------------------------------------------[ DISK OVERVIEW ]------------------------------------------------### +###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}### " fdisk -l "${instl_drive}" | grep -E --color=no 'Dev|dev' |GREP_COLORS='mt=01;36' grep -E --color=always 'EFI System|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'Linux root|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'Linux home|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'Linux swap|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'Linux extended boot|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------### " +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " BLUE " @@ -4609,9 +4613,11 @@ ${multi_swap} if [[ "${multibooting}" == "n" ]]; then reload until auto_part; do : ; done + return 0 elif [[ "${multibooting}" == "y" ]]; then reload until manual_part; do : ; done + return 0 fi else y_n @@ -4620,10 +4626,10 @@ ${multi_swap} #-------------------------------------------------------------------------------------------------- elif [[ "${sanity}" == "no" ]]; then sleep 0.2 - RED " + NC " ----------------------------- - ### ${yellow}SANITY CHECK FAILED${red} ### + ### ${red}SANITY CHECK FAILED ${nc}### -----------------------------" NC " @@ -4639,25 +4645,23 @@ ${multi_swap} if [[ "${espprt}" == "fail" && -e "${esp_dev}" ]]; then sleep 0.2 CYAN " - --------------------------------------------------- - ### ${yellowl}/ESP: Not all prerequisites are satisfied ${nc}${cyan}### - ---------------------------------------------------" + -------------------------------------------------- + ### ${yellowl}ESP: ${nc}Not all prerequisites are satisfied ${cyan}### + --------------------------------------------------" if [[ "${espmnt}" == "2" ]]; then sleep 0.2 - NC " + CYAN " - ---------------------------------------------------- - >>> ${cyan}Select ${yellowl}/mnt/efi ${nc}${cyan}as the mountpoint for your ${yellowl}/ESP ${nc}${nc} - ----------------------------------------------------" + >> ${nc}Select ${yellowl}/mnt/efi ${nc}as the mountpoint for your ${yellowl}ESP " fi if [[ "${xbootprt}" == "fail" ]]; then sleep 0.2 - NC " - ------------------------------------------------------------------------------------------ - >>> ${cyan}Systemd-boot:${nc} + CYAN " - >>> ${cyan}Create a ${yellowl}300M ${nc}${cyan}(at minimum) Linux Extended Boot Partition ${nc}(XBOOTLDR) ${yellowl}[GUID CODE: ea00] ${nc}${nc} - ------------------------------------------------------------------------------------------" + >> ${yellowl}Systemd-boot:${nc}${cyan} + + >> ${nc}Create a ${yellowl}300M ${nc}(at minimum) Linux Extended Boot Partition ${bwhite}(XBOOTLDR) ${yellowl}[GUID CODE: ea00] + " fi NC " @@ -4718,7 +4722,7 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Encry sleep 0.2 RED " ----------------------------------------- - ### ${yellow}Incompatible Selection detected ${red}### + ### ${nc}Incompatible Selection detected ${red}### -----------------------------------------" YELLOW " @@ -4757,7 +4761,7 @@ Enter [Y/n]: " sleep 0.2 YELLOW " - > Set your ${nc}LUKS ${yellow}encryption password: " + > Set your LUKS encryption password: " BLUE " @@ -4767,7 +4771,7 @@ Enter password: " sleep 0.2 YELLOW " - > Verify your ${nc}LUKS ${yellow}encryption password: " + > Verify your LUKS encryption password: " BLUE " @@ -4779,7 +4783,7 @@ Re-enter password: " sleep 0.2 RED " --------------------------------------------------- - ### ${yellow}Passwords don't match. Please try again.. ${red}### + ### ${nc}Passwords don't match. Please try again.. ${red}### ---------------------------------------------------" reload return 1 @@ -4802,7 +4806,7 @@ Enter a name: " sleep 0.2 RED " ----------------------------------------- - ### ${yellow}Please enter a name to continue ${red}### + ### ${nc}Please enter a name to continue ${red}### -----------------------------------------" reload return 1 @@ -4854,7 +4858,7 @@ Enter a name: " sleep 0.2 RED " ----------------------------------------- - ### ${yellow}Please enter a name to continue ${red}### + ### ${nc}Please enter a name to continue ${red}### -----------------------------------------" reload return 1 @@ -4886,14 +4890,14 @@ instl() { CYAN " - (*) ${nc}Please complete ${yellowl}'Locale & Keyboard Layout Selection'${nc} to continue + >> ${nc}Please complete ${bwhite}'Locale & Keyboard Layout Selection' ${nc}to continue " | pv -qL 70 else sleep 0.2 CYAN " - (*) ${nc}Please complete ${yellowl}'Locale & Keyboard Layout Selection'${nc} to continue + >> ${nc}Please complete ${bwhite}'Locale & Keyboard Layout Selection' ${nc}to continue " fi until slct_locale; do : ; done @@ -5027,15 +5031,15 @@ set_mode() { ==> [${green}Filesystems OK${nc}] " sleep 0.2 - YELLOW " -###---------------------------------------------[ FILESYSTEM OVERVIEW ]---------------------------------------------### + CYAN " +###${nc}---------------------------------------------${cyan}[ ${bwhite}FILESYSTEM OVERVIEW ${nc}${cyan}]${nc}---------------------------------------------${cyan}### - " + " lsblk -f|GREP_COLORS='mt=01;36' grep -E --color=always 'vfat|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'ext4|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'btrfs|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'ntfs|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'swap|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" - echo +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### + " sleep 0.2 return 0 fi @@ -5071,7 +5075,7 @@ Enter a Mode number: " "") RED " ------------------------------------------ - ### ${yellow}Please select a Mode to continue ${red}### + ### ${nc}Please select a Mode to continue ${red}### ------------------------------------------" reload return 1 ;; @@ -5086,15 +5090,15 @@ Enter a Mode number: " ==> [${green}Filesystems OK${nc}] " sleep 0.2 - YELLOW " -###---------------------------------------------[ FILESYSTEM OVERVIEW ]---------------------------------------------### + CYAN " +###${nc}---------------------------------------------${cyan}[ ${bwhite}FILESYSTEM OVERVIEW ${nc}${cyan}]${nc}---------------------------------------------${cyan}### - " + " lsblk -f|GREP_COLORS='mt=01;36' grep -E --color=always 'vfat|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'ext4|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'btrfs|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'ntfs|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'swap|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------###" - echo +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### + " sleep 0.2 } ################################################################################################### @@ -5199,7 +5203,7 @@ ${magenta}###${nc}----------------------------------------${magenta}[ ${bwhite}A fi sleep 0.2 #-------------------------------------------------------------------------------------------------- - if [[ ${xbootloader} == "yes" ]]; then + if [[ "${xbootloader}" == "yes" ]]; then if mkfs.fat -F 32 -n XBOOTLDR "${xboot_dev}" > "${void}" 2> "${log}" ; then mount --mkdir "${xboot_dev}" /mnt/boot > "${void}" 2> "${log}" || err_abort sleep 0.2 @@ -5216,7 +5220,7 @@ ${magenta}###${nc}----------------------------------------${magenta}[ ${bwhite}A fi sleep 0.2 #-------------------------------------------------------------------------------------------------- - if [[ ${fs} == "1" && -e "${home_dev}" && "${sep_home}" == "y" ]]; then + if [[ "${fs}" == "1" && -e "${home_dev}" && "${sep_home}" == "y" ]]; then if [[ "${smartpart}" == "y" ]]; then homeform="y" elif [[ "${preset}" =~ ^(3|4)$ ]]; then @@ -5354,7 +5358,7 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: " fi RED " --------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}### + ### ${yellow}WARNING: ${nc}PARTITION HAS NOT BEEN FORMATTED ${red}### ---------------------------------------------------" sleep 2 skip @@ -5407,7 +5411,7 @@ Enter a partition number ${bwhite}(empty to skip and proceed)${blue}: " fi RED " --------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}### + ### ${yellow}WARNING: ${nc}PARTITION HAS NOT BEEN FORMATTED ${red}### ---------------------------------------------------" sleep 2 skip @@ -5525,7 +5529,7 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: " else RED " --------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}### + ### ${yellow}WARNING: ${nc}PARTITION HAS NOT BEEN FORMATTED ${red}### ---------------------------------------------------" sleep 2 skip @@ -5536,7 +5540,7 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: " ################################################################################################### ask_homepart_form() { - if [[ ${fs} == "1" && -e "${home_dev}" && "${sep_home}" == "y" ]]; then + if [[ "${fs}" == "1" && -e "${home_dev}" && "${sep_home}" == "y" ]]; then if [[ "${smartpart}" == "y" ]]; then homeform="y" elif [[ "${preset}" =~ ^(3|4)$ ]]; then @@ -5656,7 +5660,7 @@ Enter a name ${bwhite}(empty to skip and proceed)${blue}: " else RED " --------------------------------------------------- - ### ${yellowl}WARNING: ${nc}${yellow}PARTITION HAS NOT BEEN FORMATTED ${red}### + ### ${yellow}WARNING: ${nc}PARTITION HAS NOT BEEN FORMATTED ${red}### ---------------------------------------------------" skip return 0 @@ -5914,7 +5918,7 @@ ${magenta}###${nc}-------------------------------${magenta}[ ${bwhite}Confirm In ################################################################################################### revise() { - reset=(xbootloader="" gfxconf="" vendor_slct="" vendor="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" vendors="" lowlat="" nogsp="" sanity="" smartpart="" partok="" preset="" presetpart="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" set_optm_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="") + reset=(xbootloader="" gfxconf="" vendor_slct="" vendor="" desktop="" terminal="" custompkgs="" customservices="" cust_bootopts="" REGDOM="" autoroot="" autoxboot="" autohome="" autoswap="" vendors="" lowlat="" nogsp="" sanity="" partok="" preset="" set_optm="" ask_param="" kill_watchdog="" genoptm="" desk_setup="" devel="" web="" web_pkg="" web_aur="" web_slct="" set_optm_slct="" oomd="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="") export "${reset[@]}" gfxpkgs=() @@ -5993,7 +5997,7 @@ ${magenta}###${nc}-----------------------------------${magenta}[ ${bwhite}Secure > Select a disk for Secure Erasure ${red}[!] (CAUTION) [!]${yellow} " RED " -------------------------------------------------------------------------- - ### ${yellow}A reboot is ${nc}mandatory ${yellow}and will take effect ${nc}immediately ${yellow}when done ${red}### + ### ${nc}A reboot is mandatory and will take effect ${yellowl}immediately ${nc}when done ${red}### --------------------------------------------------------------------------" NC " @@ -6242,14 +6246,14 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}LUKS ==> [${green}Filesystems OK${nc}] " sleep 0.2 - YELLOW " -###---------------------------------------------[ FILESYSTEM OVERVIEW ]---------------------------------------------### + CYAN " +###${nc}---------------------------------------------${cyan}[ ${bwhite}FILESYSTEM OVERVIEW ${nc}${cyan}]${nc}---------------------------------------------${cyan}### " lsblk -f|GREP_COLORS='mt=01;36' grep -E --color=always 'vfat|$'|GREP_COLORS='mt=01;32' grep -E --color=always 'ext4|$'|GREP_COLORS='mt=01;35' grep -E --color=always 'btrfs|$'|GREP_COLORS='mt=01;31' grep -E --color=always 'ntfs|$'|GREP_COLORS='mt=01;33' grep -E --color=always 'swap|$' - YELLOW " + CYAN " -###-----------------------------------------------------------------------------------------------------------------### +###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}### " sleep 0.2 } @@ -6302,7 +6306,7 @@ Enter country name or country code ${bwhite}(Empty for Defaults)${blue}: " - > Enable Arch's ${nc}'Multilib' ${yellow}repository in the installed system ? [y/N] " + > Enable Arch's 'Multilib' repository in the installed system ? [y/N] " BLUE " @@ -6834,7 +6838,7 @@ NOUKI ################################################################################################### var_opts() { - if [[ ${sb_sign} == "y" && "${setrescue}" == "y" ]]; then + if [[ "${sb_sign}" == "y" && "${setrescue}" == "y" ]]; then local stage_prompt="Rescue Entry Creation" if [[ "${bootloader}" == "1" ]]; then if arch-chroot /mnt <<-RESCUE > "${void}" 2>&1 2> "${log}" ; then @@ -7169,7 +7173,7 @@ UDISKS2 fi fi - if [[ -n ${REGDOM} ]]; then + if [[ -n "${REGDOM}" ]]; then local stage_prompt="Wpa_Supplicant Configuration" if arch-chroot /mnt <<-WPA > "${void}" 2>&1 2> "${log}" ; then cat <<-SUPPLICANT > /etc/wpa_supplicant/wpa_supplicant.conf || exit @@ -7195,9 +7199,9 @@ view_optm() { ################################################################################################### secboot_sign() { - if [[ ${sb_sign} == "y" ]]; then + if [[ "${sb_sign}" == "y" ]]; then local stage_prompt="Secure-Boot Signing" - if [[ ${bootloader} == "1" ]]; then + if [[ "${bootloader}" == "1" ]]; then if arch-chroot /mnt <<-SECSIGN > "${void}" 2>&1 2> "${log}" ; then systemctl disable systemd-boot-update || exit pacman -S --noconfirm sbctl || exit @@ -7213,7 +7217,7 @@ SECSIGN else stage_fail fi - if [[ ${setrescue} == "y" ]]; then + if [[ "${setrescue}" == "y" ]]; then local stage_prompt="Rescue Entry Secure-Boot Signing" if arch-chroot /mnt <<-SECSIGN > "${void}" 2>&1 2> "${log}" ; then sbctl sign -s ${btldr_esp_mount}/EFI/Linux/rescue.efi || exit @@ -7223,7 +7227,7 @@ SECSIGN stage_fail fi fi - elif [[ ${bootloader} == "2" ]]; then + elif [[ "${bootloader}" == "2" ]]; then if arch-chroot /mnt <<-SECSIGN > "${void}" 2>&1 2> "${log}" ; then pacman -S --noconfirm sbctl || exit sbctl create-keys || exit