Only install yay if necessary
This commit is contained in:
parent
b54153fd7a
commit
24abd8b21a
1 changed files with 10 additions and 6 deletions
|
@ -1,8 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sudo pacman -S --needed git base-devel
|
if ! command -v yay > /dev/null 2>&1
|
||||||
contextRoot="$(mktemp -d)";
|
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;
|
|
||||||
|
|
Loading…
Reference in a new issue