#!/bin/bash # Update system and install prerequisites echo "Updating system and installing prerequisites..." sudo pacman -Syu --noconfirm base-devel git # Clone the yay repository echo "Cloning the yay repository..." git clone https://aur.archlinux.org/yay.git # Navigate to the yay directory cd yay || { echo "Failed to change directory to yay."; exit 1; } # Build and install yay echo "Building and installing yay..." makepkg -si --noconfirm # Clean up cd .. rm -rf yay echo "yay installation completed!"