aur/build.sh

21 lines
387 B
Bash
Raw Normal View History

2021-05-19 09:48:07 +02:00
#!/bin/bash
2021-05-19 09:59:59 +02:00
pacman -Syu --noconfirm
2021-05-19 09:54:28 +02:00
useradd build -m
2021-05-19 09:59:59 +02:00
echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
2021-05-19 09:54:28 +02:00
chown -R build:build *
2021-05-19 09:48:07 +02:00
for d in */ ; do
echo "$d"
cd "$d"
2021-05-19 10:08:46 +02:00
sudo -u build sh -c 'makepkg -s --skippgpcheck --noconfirm'
2021-05-19 09:48:07 +02:00
if [ $? -eq 0 ]; then
2021-05-19 10:08:46 +02:00
for pkg in *.pkg.tar.zst ; do
cp $pkg /repo/
repo-add /repo/nyyu.db.tar.zst /repo/$pkg
done
2021-05-19 09:48:07 +02:00
fi
cd ..
done