Files
lnx-arch/scripts/99_yay.sh

33 lines
530 B
Bash
Raw Normal View History

2024-05-01 16:14:59 -05:00
#!/usr/bin/env bash
# klevstul
2024-05-01 16:18:51 -05:00
# https://itsfoss.com/install-yay-arch-linux/
2024-05-01 16:14:59 -05:00
echo "<< 99_yay.sh >>"
2024-05-01 16:23:22 -05:00
user=poq
2024-05-01 16:14:59 -05:00
if [ "$EUID" -ne 0 ]
then echo "error: run as 'root'"
exit
fi
2024-05-01 16:32:01 -05:00
# update system
sudo pacman -Syu
# install dependencies
pacman -S --needed --noconfirm go
# install yay
2024-05-01 16:20:31 -05:00
rm -rf /tmp/yay
2024-05-01 16:27:13 -05:00
runuser -l ${user} -c 'git clone https://aur.archlinux.org/yay.git /tmp/yay'
2024-05-01 16:38:22 -05:00
2024-05-01 16:41:36 -05:00
sudo -u ${user} 'cd /tmp/yay && makepkg -si'
2024-05-01 16:40:21 -05:00
2024-05-01 16:38:22 -05:00
#runuser -l ${user} -c 'cd /tmp/yay && makepkg -si'
2024-05-01 16:32:01 -05:00
# test yay
2024-05-01 16:23:22 -05:00
runuser -l ${user} -c 'yay --version'