2021-05-19 09:48:07 +02:00
|
|
|
#!/bin/bash
|
2021-05-19 09:59:59 +02:00
|
|
|
|
2021-05-19 11:26:24 +02:00
|
|
|
build() {
|
2021-05-19 13:38:03 +02:00
|
|
|
if grep -c 'git+' PKGBUILD > /dev/null ; then
|
2021-05-19 13:39:48 +02:00
|
|
|
makepkg --nodeps --nobuild --skippgpcheck --noconfirm
|
2021-05-19 13:26:30 +02:00
|
|
|
fi
|
2021-05-19 13:17:53 +02:00
|
|
|
makepkg --printsrcinfo > .SRCINFO
|
2021-06-04 08:35:25 +02:00
|
|
|
name=$(grep -m1 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
2021-05-19 13:17:53 +02:00
|
|
|
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
|
|
|
rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
|
|
|
epoch=$(grep 'epoch' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
2021-05-19 12:24:22 +02:00
|
|
|
if [ -n "$epoch" ] ; then
|
|
|
|
epoch=$epoch:
|
|
|
|
fi
|
2021-05-19 11:53:25 +02:00
|
|
|
|
2021-05-19 13:38:03 +02:00
|
|
|
if ! compgen -G "/repo/$name-$epoch$ver-$rel-*.pkg.tar.zst" > /dev/null ; then
|
2021-05-19 16:41:48 +02:00
|
|
|
if makepkg -s --skippgpcheck --noconfirm --sign || makepkg -s --skippgpcheck --nocheck --noconfirm --sign ; then
|
2021-05-19 11:53:25 +02:00
|
|
|
for pkg in *.pkg.tar.zst ; do
|
2021-05-19 16:41:48 +02:00
|
|
|
cp "$pkg"{,.sig} /repo/
|
2021-06-04 07:53:26 +02:00
|
|
|
repo-add -R -s /repo/nyyu.db.tar.zst /repo/"$pkg"
|
2021-05-19 11:53:25 +02:00
|
|
|
done
|
2021-06-05 21:01:44 +02:00
|
|
|
sudo pacman -Sy
|
2021-05-19 11:53:25 +02:00
|
|
|
fi
|
2021-05-19 09:48:07 +02:00
|
|
|
fi
|
2021-05-19 11:26:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
for d in */ ; do
|
|
|
|
cd "$d" || continue
|
|
|
|
build
|
2021-05-19 09:48:07 +02:00
|
|
|
cd ..
|
|
|
|
done
|
2021-05-19 11:26:24 +02:00
|
|
|
|
|
|
|
while read -r p; do
|
|
|
|
git clone https://aur.archlinux.org/"$p".git || continue
|
|
|
|
cd "$p" || continue
|
|
|
|
build
|
|
|
|
cd ..
|
|
|
|
done <aur.txt
|