Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install yay on Arch Linux
if ! command -v yay >/dev/null; then
tmp=$(mktemp -d)
function finish { rm -rf "$tmp"; } # clean up after yourself...
trap finish EXIT # ...no matter how you exist
git clone https://aur.archlinux.org/yay.git "$tmp"
pushd "$tmp"
makepkg -sri --noconfirm --needed
popd
if ! command -v yay >/dev/null; then
>&2 echo "yay failed to install"
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.