Created
April 3, 2019 05:46
-
-
Save hlissner/9ec4d02e809f41911b057f8655776edc to your computer and use it in GitHub Desktop.
Install yay on Arch Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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