From eb0ee2a8b6c15323572017c269907a654de43309 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 29 Dec 2023 21:43:19 +0000 Subject: sudo --- gohan.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gohan.sh b/gohan.sh index 8815308..fb51685 100755 --- a/gohan.sh +++ b/gohan.sh @@ -16,7 +16,7 @@ install_from_pacman() { # Install packages required by GOHAN. install_dependancies() { - echo "Installing dependancies." + echo "Installing dependancies ..." install_from_pacman base-devel install_from_pacman git install_from_pacman go @@ -83,15 +83,17 @@ get_username_and_password() { read_password "Retype password: " pass2=$PASSWORD done + unset PASSWORD } configure_sudo() { install_from_pacman sudo - [ -f /etc/sudoers ] && sed -i "s/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers + [ -f "/etc/sudoers.d/$name" ] || echo "$name ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/$name" } # Sets up the home directory for the user account. setup_user_home_directory() { + echo "Setting up user home directory ..." clean_user_home_directory } @@ -106,7 +108,7 @@ clean_user_home_directory() { install_yay() { [ -f "/usr/bin/yay" ] || ( - echo "Installing yay." + echo "Installing yay ..." # Use all cores for compilation. sed -i "s/-j2/-j$(nproc)/;s/^#MAKEFLAGS/MAKEFLAGS/" /etc/makepkg.conf cd /tmp @@ -130,4 +132,4 @@ configure_sudo setup_user_home_directory -install_yay +#install_yay -- cgit v1.2.3-13-gbd6f