arch/build
2024-04-19 17:58:41 +02:00

32 lines
523 B
Bash
Executable File

#!/bin/bash
set REPO ontake
set CHROOT $PWD/.chroot
if not command -q mkarchroot
echo "Please install devtools:"
echo "sudo pacman -S devtools"
exit 1
end
if not test -d $CHROOT/root
mkdir -p $CHROOT
mkarchroot $CHROOT/root base-devel
end
if set -q argv[1]
cd $argv[1]
makechrootpkg -cur $CHROOT
mv *.pkg.tar.zst ../
cd -
else
rm -f *.pkg.tar.zst
for file in **/PKGBUILD
cd (dirname $file)
makechrootpkg -cur $CHROOT
mv *.pkg.tar.zst ../
cd -
end
end
repo-add --remove $REPO.db.tar.gz *.pkg.tar.zst