Refactored helpers to reduce duplication and improve naming.
- Renamed chroot_install/chroot_enable to chroot_pacman_install/chroot_systemd_enable. - Made chroot_systemd_enable auto-print status, removing need for wrapper functions. - Used generic prompt helpers instead of duplicating logic in specialized functions. - Inlined and removed single-use wrapper functions throughout.
This commit is contained in:
@@ -22,14 +22,10 @@
|
||||
# Sets:
|
||||
# USERNAME - the entered username
|
||||
prompt_username() {
|
||||
local username
|
||||
|
||||
while true; do
|
||||
print "Please enter the username you'd like to use for your account:"
|
||||
read -r username
|
||||
prompt "Please enter the username you'd like to use for your account:" USERNAME
|
||||
|
||||
if validate_username "$username"; then
|
||||
USERNAME="$username"
|
||||
if validate_username "$USERNAME"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user