Merge pull request #19 from Benjman/optomistic-yay-installation

Only install `yay` if needed
This commit is contained in:
Gaurav Bankar
2025-08-08 00:11:06 +05:30
committed by GitHub

View File

@@ -11,7 +11,9 @@ print_info "\nStarting prerequisites setup..."
run_command "pacman -Syyu --noconfirm" "Update package database and upgrade packages (Recommended)" "yes" # no 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 "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" run_command "makepkg --noconfirm -si && cd .. # builds with makepkg" "Build YAY (Must)/Breaks the script" "no" "no"
fi fi