dotfiles/script/updateaurpackages

17 lines
326 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env bash
#
# Update all AUR packages in $HOME/pkg
2023-10-07 08:43:32 +00:00
set -euo pipefail
find "$HOME/pkg" -mindepth 1 -maxdepth 1 -type d -print0 | while read -rd $'\0' pkgdir
do
cd "$pkgdir"
pullres=$(git pull --rebase)
if [ "$pullres" = "Already up to date." ]; then
continue
fi
makepkg -si --noconfirm --needed
done