From a695516ecd572381703bd3bbe77f45fc60317cf5 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 14 Mar 2023 22:34:05 +0100 Subject: [PATCH] feat: reduce amount of questions --- base.sh | 10 +++------- config | 2 ++ dotfiles.sh | 8 +------- gpu.sh | 1 - 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/base.sh b/base.sh index 39de516..85c312c 100755 --- a/base.sh +++ b/base.sh @@ -21,12 +21,8 @@ echo "$hostname" > /etc/hostname # Packages case "$(lscpu | grep Vendor)" in - *AuthenticAMD*) - cpu=amd - ;; - *GenuineIntel*) - cpu=intel - ;; + *AuthenticAMD*) cpu=amd ;; + *GenuineIntel*) cpu=intel ;; esac $PACMAN "${pkg[@]}" "$cpu-ucode" @@ -43,7 +39,7 @@ fi # Users echo "root:$root_passwd" | chpasswd -useradd -mG wheel "$username" +useradd -mG wheel "$username" -s "${default_shell-/bin/bash}" echo "$username:$user_passwd" | chpasswd sed -i '/^# %wheel\s\+ALL=(ALL:ALL)\s\+ALL/s/^#\s*//' /etc/sudoers diff --git a/config b/config index ec9ae21..4158a27 100644 --- a/config +++ b/config @@ -5,6 +5,8 @@ username=ange user_passwd=ange root_passwd=root +default_shell=/bin/zsh + hostname="$username-pc" tz='Europe/Paris' diff --git a/dotfiles.sh b/dotfiles.sh index ef2efbc..f2ec319 100755 --- a/dotfiles.sh +++ b/dotfiles.sh @@ -15,14 +15,8 @@ fi git clone --bare "$repo" "$HOME/.dotfiles" -while ! $config checkout; do - echo 'Please the error above and press enter:' - read -r -done - +$config checkout -f $config submodule update --init --recursive --remote $config config status.showUntrackedFiles no -chsh -s /bin/zsh - echo -e "${BOLD}${GREEN}DONE. You need to reboot to apply the changes.${NORMAL}" diff --git a/gpu.sh b/gpu.sh index e089f08..aa83653 100755 --- a/gpu.sh +++ b/gpu.sh @@ -30,7 +30,6 @@ case "$(lspci -k | grep -E '(VGA|3D)')" in esac sed -i "s/^MODULES=(/MODULES=($modules/" /etc/mkinitcpio.conf - mkinitcpio -P echo -e "${BOLD}${GREEN}GPU drivers install finished.${NORMAL}"