From fad53c5f583aa4ce3ae9a056c30b787cfd7eaaf5 Mon Sep 17 00:00:00 2001 From: Claire West Date: Mon, 22 Dec 2025 10:09:16 -0500 Subject: [PATCH 1/3] Show more disk info --- easy-arch.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index 587f983..b5d9e1e 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -9,7 +9,7 @@ clear # Cosmetics (colours for text). BOLD='\e[1m' BRED='\e[91m' -BBLUE='\e[34m' +BBLUE='\e[34m' BGREEN='\e[92m' BYELLOW='\e[93m' RESET='\e[0m' @@ -62,7 +62,7 @@ kernel_selector () { info_print "2) Hardened: A security-focused Linux kernel" info_print "3) Longterm: Long-term support (LTS) Linux kernel" info_print "4) Zen Kernel: A Linux kernel optimized for desktop usage" - input_print "Please select the number of the corresponding kernel (e.g. 1): " + input_print "Please select the number of the corresponding kernel (e.g. 1): " read -r kernel_choice case $kernel_choice in 1 ) kernel="linux" @@ -152,7 +152,7 @@ userpass_selector () { return 1 fi echo - input_print "Please enter the password again (you're not going to see it): " + input_print "Please enter the password again (you're not going to see it): " read -r -s userpass2 echo if [[ "$userpass" != "$userpass2" ]]; then @@ -173,7 +173,7 @@ rootpass_selector () { return 1 fi echo - input_print "Please enter the password again (you're not going to see it): " + input_print "Please enter the password again (you're not going to see it): " read -r -s rootpass2 echo if [[ "$rootpass" != "$rootpass2" ]]; then @@ -264,10 +264,11 @@ until keyboard_selector; do : ; done # Choosing the target for the installation. info_print "Available disks for the installation:" +mapfile -t ARR < <(lsblk -dpno NAME,SIZE,MODEL | grep -P "/dev/sd|nvme|vd"); PS3="Please select the number of the corresponding disk (e.g. 1): " -select ENTRY in $(lsblk -dpnoNAME|grep -P "/dev/sd|nvme|vd"); +select ENTRY in "${ARR[@]}"; do - DISK="$ENTRY" + DISK="$(ARR=($ENTRY);echo ${ARR[0]})" info_print "Arch Linux will be installed on the following disk: $DISK" break done @@ -324,7 +325,7 @@ mkfs.fat -F 32 "$ESP" &>/dev/null # Creating a LUKS Container for the root partition. info_print "Creating LUKS Container for the root partition." echo -n "$password" | cryptsetup luksFormat "$CRYPTROOT" -d - &>/dev/null -echo -n "$password" | cryptsetup open "$CRYPTROOT" cryptroot -d - +echo -n "$password" | cryptsetup open "$CRYPTROOT" cryptroot -d - BTRFS="/dev/mapper/cryptroot" # Formatting the LUKS Container as BTRFS. From 905bb435638f9197996ab5a931dee1dbc64a1fa0 Mon Sep 17 00:00:00 2001 From: Claire West Date: Mon, 22 Dec 2025 10:19:21 -0500 Subject: [PATCH 2/3] Remove editor auto-formatting --- easy-arch.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easy-arch.sh b/easy-arch.sh index b5d9e1e..f01894a 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -9,7 +9,7 @@ clear # Cosmetics (colours for text). BOLD='\e[1m' BRED='\e[91m' -BBLUE='\e[34m' +BBLUE='\e[34m' BGREEN='\e[92m' BYELLOW='\e[93m' RESET='\e[0m' @@ -62,7 +62,7 @@ kernel_selector () { info_print "2) Hardened: A security-focused Linux kernel" info_print "3) Longterm: Long-term support (LTS) Linux kernel" info_print "4) Zen Kernel: A Linux kernel optimized for desktop usage" - input_print "Please select the number of the corresponding kernel (e.g. 1): " + input_print "Please select the number of the corresponding kernel (e.g. 1): " read -r kernel_choice case $kernel_choice in 1 ) kernel="linux" @@ -152,7 +152,7 @@ userpass_selector () { return 1 fi echo - input_print "Please enter the password again (you're not going to see it): " + input_print "Please enter the password again (you're not going to see it): " read -r -s userpass2 echo if [[ "$userpass" != "$userpass2" ]]; then @@ -173,7 +173,7 @@ rootpass_selector () { return 1 fi echo - input_print "Please enter the password again (you're not going to see it): " + input_print "Please enter the password again (you're not going to see it): " read -r -s rootpass2 echo if [[ "$rootpass" != "$rootpass2" ]]; then @@ -325,7 +325,7 @@ mkfs.fat -F 32 "$ESP" &>/dev/null # Creating a LUKS Container for the root partition. info_print "Creating LUKS Container for the root partition." echo -n "$password" | cryptsetup luksFormat "$CRYPTROOT" -d - &>/dev/null -echo -n "$password" | cryptsetup open "$CRYPTROOT" cryptroot -d - +echo -n "$password" | cryptsetup open "$CRYPTROOT" cryptroot -d - BTRFS="/dev/mapper/cryptroot" # Formatting the LUKS Container as BTRFS. From 6154b986fb23e6d8e0858efd894c2e5b8a6706e6 Mon Sep 17 00:00:00 2001 From: Claire West Date: Mon, 22 Dec 2025 16:09:19 -0500 Subject: [PATCH 3/3] Better approach for extracting first column --- easy-arch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy-arch.sh b/easy-arch.sh index f01894a..a8206e4 100755 --- a/easy-arch.sh +++ b/easy-arch.sh @@ -268,7 +268,7 @@ mapfile -t ARR < <(lsblk -dpno NAME,SIZE,MODEL | grep -P "/dev/sd|nvme|vd"); PS3="Please select the number of the corresponding disk (e.g. 1): " select ENTRY in "${ARR[@]}"; do - DISK="$(ARR=($ENTRY);echo ${ARR[0]})" + DISK="$($ENTRY | awk '{print $1;}')" info_print "Arch Linux will be installed on the following disk: $DISK" break done