From ff2e6411828644b7d19d2af77b70d91de438dd1c Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 31 Oct 2020 19:03:07 -0400 Subject: [PATCH] Refactor install_arch user inputs --- install_arch | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/install_arch b/install_arch index 19b6d26..5c6f4fa 100755 --- a/install_arch +++ b/install_arch @@ -1,20 +1,23 @@ #!/usr/bin/env fish function main - log 'Choose timezone' + log 'Enter your configuration' read -P 'Timezone: ' -l timezone + read -P 'Hostname: ' -l new_host_name + read -P 'Network interface: ' -l net_interface + read -P 'Is your disk encrypted? (y/N) ' -l is_encrypt + read -P 'Username: ' -l username + read -P 'Boot mode (bios/uefi): ' -l boot_mode + read -P 'Grub target: ' -l device + set_timezone $timezone set_locale - log 'Choose hostname' - read -P 'Hostname: ' -l new_host_name set_hostname $new_host_name - configure_wired_network 'enp1s0' + configure_wired_network $net_interface - log 'Disc encryption' - read -P 'Is your disk encrypted? (y/N)' -l is_encrypt if test "$is_encrypt" = 'y'; or test "$is_encrypt" = 'Y' add_lvm2_mkinitcpio_hook true else @@ -23,13 +26,8 @@ function main configure_sudo - log 'Choose username' - read -P 'Username: ' -l username create_admin_user $username - log 'Configure grub' - read -P 'Boot mode (bios/uefi): ' -l boot_mode - read -P 'Grub target: ' -l device install_grub $boot_mode $device install_openssh