yay.sh ok

This commit is contained in:
tuxwarrior
2024-05-01 16:47:27 -05:00
parent 51c3a00f47
commit 385c4fbad2

View File

@@ -3,6 +3,7 @@
# klevstul # klevstul
# https://itsfoss.com/install-yay-arch-linux/ # https://itsfoss.com/install-yay-arch-linux/
# https://askubuntu.com/questions/294736/run-a-shell-script-as-another-user-that-has-no-password
echo "<< 99_yay.sh >>" echo "<< 99_yay.sh >>"
@@ -16,19 +17,14 @@ fi
# update system # update system
sudo pacman -Syu sudo pacman -Syu
# install dependencies # remove potential old yay download folder
pacman -S --needed --noconfirm go
rm -rf /tmp/yay rm -rf /tmp/yay
# clone repo # clone repo
runuser -l ${user} -c 'git clone https://aur.archlinux.org/yay.git /tmp/yay' runuser -l ${user} -c 'git clone https://aur.archlinux.org/yay.git /tmp/yay'
# build yay # build yay
# https://askubuntu.com/questions/294736/run-a-shell-script-as-another-user-that-has-no-password
sudo -u ${user} bash -c 'cd /tmp/yay && makepkg -si' sudo -u ${user} bash -c 'cd /tmp/yay && makepkg -si'
#runuser -l ${user} -c 'cd /tmp/yay && makepkg -si'
# test yay # test yay
runuser -l ${user} -c 'yay --version' runuser -l ${user} -c 'yay --version'