Skip to content

Instantly share code, notes, and snippets.

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 # matter how you exist
git clone "$tmp"
pushd "$tmp"
makepkg -sri --noconfirm --needed
if ! command -v yay >/dev/null; then
>&2 echo "yay failed to install"
exit 1
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.