#!/bin/sh #----------------------------------- # Name: install-yay # Version: 1.0.0 # Author: Solomon Laing # Description: # Installs the AUR helper yay on the # system. #----------------------------------- if ! command -v yay &> /dev/null; then echo "yay is already installed on the system." exit 0 fi echo "This script is going to attempt install yay and it's dependencies. As such it will ask for root privilages." read -r -p "Are You Sure? [y/N] " input case $input in [yY][eE][sS] | [yY]) echo "The program will continue..." ;; [nN][oO] | [nN]) exit 0 ;; *) echo "Invalid input..." exit 1 ;; esac if ! command -v fakeroot &> /dev/null; then cat $default_loc | sudo -S pacman -Sy --noconfirm base-devel fi cd /opt cat $default_loc | sudo -S git clone https://aur.archlinux.org/yay.git cat $default_loc | sudo -S chown -R $USER:users ./yay cd yay makepkg -si