Only install yay if necessary

This commit is contained in:
Manuel Thalmann 2023-04-04 17:18:53 +02:00
parent 3a7e21e435
commit 244af9b838

View file

@ -1,8 +1,12 @@
#!/bin/bash
sudo pacman -S --needed git base-devel
contextRoot="$(mktemp -d)";
if ! command -v yay > /dev/null 2>&1
then
sudo pacman -S --needed git base-devel
contextRoot="$(mktemp -d)";
git clone https://aur.archlinux.org/yay.git "$contextRoot";
pushd "$contextRoot" > /dev/null;
makepkg --noconfirm -si;
popd > /dev/null;
fi;
git clone https://aur.archlinux.org/yay.git "$contextRoot";
pushd "$contextRoot" > /dev/null;
makepkg --noconfirm -si;
popd > /dev/null;