Change: Re-connect stdin to terminal after 'pacstrap'

Change: Refrain from warning about Multi 'XBOOTLDR' partitions being detected, if an 'XBOOTLDR' is not currently needed in the installation
Change: Identation fixes, prompt editing & some comments removal
This commit is contained in:
Jane Doe
2026-03-31 17:54:06 +03:00
parent c5902e605d
commit a7d31a7a96
+10 -8
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Amelia installer for Archlinux # Amelia installer for Archlinux
# Version: 1.4.0 # Version: 1.4.1
# Source: https://gitlab.com/prism7/archery # Source: https://gitlab.com/prism7/archery
set -euo pipefail set -euo pipefail
@@ -264,18 +264,17 @@ filesystem_overview() {
} }
disk_overview() { disk_overview() {
sleep 0.2 sleep 0.2
CYAN "\n###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}###\n\n" CYAN "\n\n\n###${nc}------------------------------------------------${cyan}[ ${bwhite}DISK OVERVIEW ${nc}${cyan}]${nc}------------------------------------------------${cyan}###\n\n"
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|$' 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|$'
CYAN "\n\n###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}###" CYAN "\n\n###${nc}-----------------------------------------------------------------------------------------------------------------${cyan}###"
} }
multi_info() { multi_info() {
sleep 0.2 sleep 0.2
CYAN "\n >> ${nc}Multiple ${color}${type} ${nc}Partitions have been detected\n\n" CYAN "\n >> ${nc}Multiple ${color}${type} ${nc}Partitions have been detected"
disk_overview disk_overview
NC "\n ${color}${type} Partitions:${nc}\n\n ${dashline}\n${multi_type}\n ${dashline}\n" NC "\n ${color}${type} Partitions:${nc}\n\n ${dashline}\n${multi_type}\n ${dashline}\n"
YELLOW "\n ### Only the ${nc}1st ${type} ${yellow}partition on a selected disk can be ${nc}auto-assigned ${yellow}as a valid partition${cyan}\n\n\n >> ${nc}Partition ${yellowl}${type_comply} ${nc}is auto-assigned as such and will be ${action}\n" YELLOW "\n ### Only the ${nc}1st ${type} ${yellow}partition on a selected disk can be ${nc}auto-assigned ${yellow}as a valid partition${cyan}\n\n\n >> ${nc}Partition ${yellowl}${type_comply} ${nc}is auto-assigned as such and will be ${action}\n"
} }
# END TUI FUNCTIONS
# SYSTEM FUNCTIONS # SYSTEM FUNCTIONS
mode_check() { mode_check() {
if [[ "${run_as}" == "root" ]]; then if [[ "${run_as}" == "root" ]]; then
@@ -2338,6 +2337,9 @@ sanity_check() {
fi fi
# ATTENTION: MULTI-XBOOTLDR # ATTENTION: MULTI-XBOOTLDR
if [[ "${xbootcount}" -gt "1" ]]; then if [[ "${xbootcount}" -gt "1" ]]; then
espsize="$(lsblk -dno SIZE --bytes "${esp_dev}")"
if [[ -e "${esp_dev}" && "${espsize}" -lt "209715200" ]]; then
if [[ "${bootloader}" == "1" && "${multibooting}" == "y" ]]; then
local color="${redl}" local color="${redl}"
local type="Linux Extended Boot" local type="Linux Extended Boot"
local multi_type="${multi_xboot}" local multi_type="${multi_xboot}"
@@ -2361,6 +2363,8 @@ sanity_check() {
return 1 return 1
fi fi
fi fi
fi
fi
# ATTENTION: MULTI-HOME # ATTENTION: MULTI-HOME
if [[ "${fs}" == "1" && "${sep_home}" == "y" && "${homecount}" -gt "1" ]]; then if [[ "${fs}" == "1" && "${sep_home}" == "y" && "${homecount}" -gt "1" ]]; then
local color="${magental}" local color="${magental}"
@@ -2421,8 +2425,7 @@ sanity_check() {
sleep 0.2 sleep 0.2
CYAN "\n >> ${yellowl}WARNING: ${nc}/Root's size might not be adequate" CYAN "\n >> ${yellowl}WARNING: ${nc}/Root's size might not be adequate"
sleep 0.2 sleep 0.2
CYAN "\n CYAN "\n >> ${nc}Depending on the ${yellowl}size ${nc}of your setup, installation might ${yellowl}fail\n"
>> ${nc}Depending on the ${yellowl}size ${nc}of your setup, installation might ${yellowl}fail\n"
keypress keypress
fi fi
if [[ "${autoroot}" == "y" ]]; then if [[ "${autoroot}" == "y" ]]; then
@@ -2605,7 +2608,6 @@ sanity_check() {
ok ok
fi fi
msg "SANITY CHECK OK" msg "SANITY CHECK OK"
printf "\n\n"
disk_overview disk_overview
get "Proceed using the ${nc}${cyan}current ${blue}partitioning layout ? [Y/n]" get "Proceed using the ${nc}${cyan}current ${blue}partitioning layout ? [Y/n]"
read -r -p "==> " partok read -r -p "==> " partok
@@ -3803,6 +3805,7 @@ AUR_NVIDIA_PKGS
local stage_prompt="Pacstrap System" local stage_prompt="Pacstrap System"
stage_fail stage_fail
fi fi
exec </dev/console >/dev/console 2>&1
if [[ "${fs}" == "2" ]]; then if [[ "${fs}" == "2" ]]; then
local prompt="Fstab" local prompt="Fstab"
local stage_prompt="Fstab" local stage_prompt="Fstab"
@@ -4742,7 +4745,6 @@ CUSTOM_SRVC
optimizations optimizations
secboot_sign secboot_sign
} }
#END SYSTEM FUNCTIONS
nc="\e[0m" nc="\e[0m"
red="\e[31m" red="\e[31m"
cyan="\e[36m" cyan="\e[36m"