set -e build="/tmp/archiso-profile-do-not-delete" out="built-isos" profile="releng" work="/tmp/archiso-tmp" mkdir -p $build mkdir -p $out mkdir -p /tmp/blankdb sudo pacman -Syw --cachedir profile/airootfs/var/lib/mkessler-arch/ --dbpath /tmp/blankdb mkessler-desktop repo-add profile/airootfs/var/lib/mkessler-arch/local.db.tar.gz profile/airootfs/var/lib/mkessler-arch/*.tar.zst cp -r /usr/share/archiso/configs/$profile/ $build cp install-arch $build/$profile/airootfs/root/ # replace some files of releng profile wtih custom ones # e.g. a custom pacman.conf # and the custom downloaded repo cp -r profile/. $build/$profile # add custom repository to pacman.conf cat >> $build/$profile/pacman.conf <> $build/$profile/packages.x86_64 <