Merge pull request #19 from Benjman/optomistic-yay-installation
Only install `yay` if needed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user