From cc5242e2c2a3532e4a23961220376f994617ec34 Mon Sep 17 00:00:00 2001 From: Ben Record Date: Wed, 6 Aug 2025 17:47:00 -0600 Subject: [PATCH] Only install `yay` if needed --- scripts/installer/prerequisites.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/installer/prerequisites.sh b/scripts/installer/prerequisites.sh index acff4dc..9c7b88a 100755 --- a/scripts/installer/prerequisites.sh +++ b/scripts/installer/prerequisites.sh @@ -11,7 +11,9 @@ print_info "\nStarting prerequisites setup..." run_command "pacman -Syyu --noconfirm" "Update package database and upgrade packages (Recommended)" "yes" # no -if run_command "pacman -S --noconfirm --needed git base-devel" "Install YAY (Must)/Breaks the script" "yes"; then # +if command -v yay > /dev/null; then + print_info "Skipping yay installation (already installed)." +elif run_command "pacman -S --noconfirm --needed git base-devel" "Install YAY (Must)/Breaks the script" "yes"; then # run_command "git clone https://aur.archlinux.org/yay.git && cd yay" "Clone YAY (Must)/Breaks the script" "no" "no" run_command "makepkg --noconfirm -si && cd .. # builds with makepkg" "Build YAY (Must)/Breaks the script" "no" "no" fi