Files
dotfiles/update-aur-pkgs.sh

22 lines
614 B
Bash
Raw Normal View History

2024-09-24 18:58:57 +02:00
#!/usr/bin/env bash
2025-10-11 01:37:44 +02:00
set -o nounset
set -o errexit
2024-09-24 18:58:57 +02:00
for pkg in pkgbuilds/* ; do
if [[ -n "$(builtin cd "${pkg}" && git rev-parse --show-superproject-working-tree)" ]] ; then
printf "checking git submodule %s\n" "${pkg}"
git submodule update --remote "${pkg}"
else
printf "checking local package %s\n" "${pkg}"
(
builtin cd "${pkg}" || exit 1
makepkg --nodeps --nobuild --noextract
)
fi
2024-09-24 18:58:57 +02:00
if git status --porcelain "${pkg}" | grep -q . ; then
git add "${pkg}"
git commit -m "aur: Update $(basename "${pkg}")"
fi
done