Changed a few prompt;s spacing

This commit is contained in:
elementrick 2024-07-09 17:21:06 +00:00
parent 1c74a88dac
commit 8041a1bea9

View file

@ -541,6 +541,7 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Local
Enter your Locale ${bwhite}(empty for 'en_US')${blue}: " Enter your Locale ${bwhite}(empty for 'en_US')${blue}: "
read -r -p " read -r -p "
==> " LOCALESET ==> " LOCALESET
echo
if [[ -z "${LOCALESET}" ]]; then if [[ -z "${LOCALESET}" ]]; then
SETLOCALE="en_US.UTF-8" SETLOCALE="en_US.UTF-8"
@ -588,6 +589,7 @@ ${magenta}###${nc}--------------------------------${magenta}[ ${bwhite}Keyboard
Enter your keyboard layout ${bwhite}(empty for 'us')${blue}: " Enter your keyboard layout ${bwhite}(empty for 'us')${blue}: "
read -r -p " read -r -p "
==> " SETKBD ==> " SETKBD
echo
if [[ -z "${SETKBD}" ]]; then if [[ -z "${SETKBD}" ]]; then
SETKBD="us" SETKBD="us"
@ -632,12 +634,14 @@ Enter a username: "
if [[ -z "${USERNAME}" ]]; then if [[ -z "${USERNAME}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Please enter a username to continue " [!] Please enter a username to continue "
reload reload
return 1 return 1
elif [[ "${USERNAME}" =~ [[:upper:]] ]]; then elif [[ "${USERNAME}" =~ [[:upper:]] ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Uppercase is not allowed. Please try again.. " [!] Uppercase is not allowed. Please try again.. "
reload reload
return 1 return 1
@ -652,6 +656,7 @@ Enter a password for${nc} ${cyan}${USERNAME}${blue}: "
if [[ -z "${USERPASSWD}" ]]; then if [[ -z "${USERPASSWD}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Please enter a password for ${USERNAME} to continue " [!] Please enter a password for ${USERNAME} to continue "
reload reload
return 1 return 1
@ -666,6 +671,7 @@ Re-enter${nc} ${cyan}${USERNAME}'s ${blue}password: "
if [[ "${USERPASSWD}" != "${USERPASSWD2}" ]]; then if [[ "${USERPASSWD}" != "${USERPASSWD2}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Passwords don't match. Please try again.. " [!] Passwords don't match. Please try again.. "
reload reload
return 1 return 1
@ -687,6 +693,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Root
Enter a password for the${nc}${cyan} Root ${blue}user: " Enter a password for the${nc}${cyan} Root ${blue}user: "
read -r -p " read -r -p "
==> " ROOTPASSWD ==> " ROOTPASSWD
echo
if [[ -z "${ROOTPASSWD}" ]]; then if [[ -z "${ROOTPASSWD}" ]]; then
sleep 0.3 sleep 0.3
@ -706,6 +713,7 @@ Re-enter${nc} ${cyan}Root ${blue}user's password: "
if [[ "${ROOTPASSWD}" != "${ROOTPASSWD2}" ]]; then if [[ "${ROOTPASSWD}" != "${ROOTPASSWD2}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Passwords don't match. Please try again.. " [!] Passwords don't match. Please try again.. "
reload reload
return 1 return 1
@ -732,12 +740,14 @@ Enter a hostname: "
if [[ -z "${HOSTNAME}" ]]; then if [[ -z "${HOSTNAME}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Please enter a hostname to continue " [!] Please enter a hostname to continue "
reload reload
return 1 return 1
elif [[ "${HOSTNAME}" =~ [[:upper:]] ]]; then elif [[ "${HOSTNAME}" =~ [[:upper:]] ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Lowercase is preferred. Please try again.. " [!] Lowercase is preferred. Please try again.. "
reload reload
return 1 return 1
@ -834,6 +844,7 @@ ${magenta}###${nc}------------------------------------${magenta}[ ${bwhite}Kerne
Enter a number: " Enter a number: "
read -r -p " read -r -p "
==> " kernelnmbr ==> " kernelnmbr
echo
case "${kernelnmbr}" in case "${kernelnmbr}" in
1) 1)
@ -906,6 +917,7 @@ ${magenta}###${nc}----------------------------------${magenta}[ ${bwhite}Bootloa
Enter a number: " Enter a number: "
read -r -p " read -r -p "
==> " bootloader ==> " bootloader
echo
case "${bootloader}" in case "${bootloader}" in
1) 1)
@ -967,6 +979,7 @@ Enter a number: "
roottype="/Root" roottype="/Root"
sleep 0.3 sleep 0.3
YELLOW " YELLOW "
### NOTE: Keeping User Data on a separate /Home Partition is supported ### NOTE: Keeping User Data on a separate /Home Partition is supported
@ -977,6 +990,7 @@ Enter a number: "
Enter [y/n]: " Enter [y/n]: "
read -r -p " read -r -p "
==> " sep_home ==> " sep_home
echo
case "${sep_home}" in case "${sep_home}" in
y) y)
@ -986,13 +1000,12 @@ Enter [y/n]: "
### A /Home Partition will be created ### A /Home Partition will be created
";; ";;
n) n)
echo
skip skip
echo;; echo;;
"") "")
sleep 0.3 sleep 0.3
echo
RED " RED "
[!] Please type 'y' or 'n' to continue.. " [!] Please type 'y' or 'n' to continue.. "
reload reload
return 1 ;; return 1 ;;
@ -1002,6 +1015,7 @@ Enter [y/n]: "
esac esac
sleep 0.3 sleep 0.3
YELLOW " YELLOW "
### ${fsname} has been selected " ;; ### ${fsname} has been selected " ;;
2) 2)
fsname="Btrfs" fsname="Btrfs"
@ -1011,6 +1025,7 @@ Enter [y/n]: "
btrfs_bootopts="rootflags=subvol=@ " btrfs_bootopts="rootflags=subvol=@ "
sleep 0.3 sleep 0.3
YELLOW " YELLOW "
### ${fsname} has been selected " ### ${fsname} has been selected "
sleep 0.3 sleep 0.3
YELLOW " YELLOW "
@ -1022,6 +1037,7 @@ Enter [y/n]: "
Enter a name: " Enter a name: "
read -r -p " read -r -p "
==> " snapname ==> " snapname
echo
if [[ -z "${snapname}" ]]; then if [[ -z "${snapname}" ]]; then
invalid invalid
@ -1030,6 +1046,7 @@ Enter a name: "
"") "")
sleep 0.3 sleep 0.3
RED " RED "
[!] Please select a Filesystem " [!] Please select a Filesystem "
reload reload
return 1 ;; return 1 ;;
@ -1065,6 +1082,7 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Swap
Enter a number: " Enter a number: "
read -r -p " read -r -p "
==> " swapmode ==> " swapmode
echo
case "${swapmode}" in case "${swapmode}" in
1) 1)
@ -1072,7 +1090,6 @@ Enter a number: "
sleep 0.3 sleep 0.3
RED " RED "
[!] Incompatible Kernel has been detected [!] " [!] Incompatible Kernel has been detected [!] "
CYAN " CYAN "
[!] Swap type will default to 'None' [!] [!] Swap type will default to 'None' [!]
@ -1099,7 +1116,6 @@ Enter a number: "
sleep 0.3 sleep 0.3
RED " RED "
[!] Incompatible Kernel has been detected [!] " [!] Incompatible Kernel has been detected [!] "
CYAN " CYAN "
[!] Swap type will default to 'None' [!] [!] Swap type will default to 'None' [!]
@ -1161,10 +1177,12 @@ set_swapsize (){
Enter Swap size ${bwhite}(in GB)${blue}: " Enter Swap size ${bwhite}(in GB)${blue}: "
read -r -p " read -r -p "
==> " swapsize ==> " swapsize
echo
if [[ -z "${swapsize}" ]]; then if [[ -z "${swapsize}" ]]; then
sleep 0.3 sleep 0.3
RED " RED "
[!] Please enter a value to continue " [!] Please enter a value to continue "
reload reload
line2 line2
@ -1174,6 +1192,7 @@ Enter Swap size ${bwhite}(in GB)${blue}: "
else else
sleep 0.3 sleep 0.3
RED " RED "
[!] Please use only digits as a value " [!] Please use only digits as a value "
reload reload
line2 line2
@ -2388,7 +2407,7 @@ Enter a disk number ${bwhite}(empty to skip)${blue}: "
if [[ -n "${sgdsk_nmbr}" ]]; then if [[ -n "${sgdsk_nmbr}" ]]; then
sgdrive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")" sgdrive="$(echo "${disks}" | awk "\$1 == ${sgdsk_nmbr} {print \$2}")"
if [[ -e "${sgdrive}" ]]; then if [[ -e "${sgdrive}" ]]; then
capacity="$(fdisk -l "${sgdrive}" | grep -E 'bytes'| grep -E 'Disk'| awk "{print \$5}")" capacity="$(fdisk -l "${sgdrive}" | grep -E 'bytes' | grep -E 'Disk' | awk "{print \$5}")"
cap_gib="$((capacity/1024000000))" cap_gib="$((capacity/1024000000))"
rootsize="$((capacity*25/100/1024000000))" rootsize="$((capacity*25/100/1024000000))"
if [[ "${run_as}" != "root" ]]; then if [[ "${run_as}" != "root" ]]; then
@ -3109,6 +3128,7 @@ ${multi_swap}
--------------------------- ---------------------------
### ${yellow}SANITY CHECK FAILED${red} ### ### ${yellow}SANITY CHECK FAILED${red} ###
---------------------------" ---------------------------"
sleep 3
if [[ "${smartpart}" == "n" && -z "${preset}" ]] ; then if [[ "${smartpart}" == "n" && -z "${preset}" ]] ; then
reload reload
until manual_part; do : ; done until manual_part; do : ; done