-
-
Save ajdungan/800eae52ecc6d6000bdee80351b68b8c to your computer and use it in GitHub Desktop.
[install yay shell script] #ArchLinux
This file contains 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)