arch/build

32 lines
523 B
Plaintext
Raw Normal View History

2024-04-19 17:24:12 +02:00
#!/bin/fish
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