Skip to content

Instantly share code, notes, and snippets.

@ajdungan
Forked from macchaberrycream/install_yay.bash
Last active July 20, 2021 00:53
Show Gist options
  • Save ajdungan/800eae52ecc6d6000bdee80351b68b8c to your computer and use it in GitHub Desktop.
Save ajdungan/800eae52ecc6d6000bdee80351b68b8c to your computer and use it in GitHub Desktop.
[install yay shell script] #ArchLinux
#!/usr/bin/env bash
# yay
# Yet another Yogurt - An AUR Helper written in Go
# <https://github.com/Jguer/yay>
#make sure git is fully installed
sudo pacman -S git #improve automation of this step
if ! builtin type -p 'yay' >/dev/null 2>&1; then
echo 'Install yay.'
sudo pacman -S --needed base base-devel wget
tmpdir="$(command mktemp -d)"
command cd "${tmpdir}" || return 1
dl_url="$(
curl -sfLS 'https://api.github.com/repos/Jguer/yay/releases/latest' |
grep 'browser_download_url' |
tail -1 |
cut -d '"' -f 4
)"
command wget "${dl_url}"
command tar xzvf yay_*_x86_64.tar.gz
command cd yay_*_x86_64 || return 1
./yay -Sy yay-bin
rm -rf "${tmpdir}"
fi
@ajdungan
Copy link
Author

to improve: doesn't remove temp directory for me....script ended on /tmp/tmp.IJ80SWqyFE/yay_10.3.0_x86_64

make sure git is fully installed (especially after barebones arch install)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment