#!/usr/bin/env bash # 2018 Luke Shumaker { set -euE COMMIT="${1:-systemd/master}" workdir=$PWD/workdir mkdir -p -- "$workdir" gitget bare https://git.parabola.nu/~lukeshu/systemd.git "$workdir/systemd.git" ./mkosi \ --package='base' \ --module=mkosi.d/systemd-libretools.sh \ --module=mkosi.d/systemd-runscript.sh \ --directory="$workdir/systemd.git:/home/runscript/packages/srcdest/systemd" \ --directory="abs/systemd-232:/home/runscript/packages/abs/systemd-232" \ --directory="abs/systemd:/home/runscript/packages/abs/systemd" \ "${workdir}/build.raw" ./runscript "${workdir}/build.raw" <<-EOF #!/usr/bin/env bash set -ex cd ~/packages/abs/systemd-232 sudo libremakepkg cd ~/packages/abs/systemd sed 's/@COMMIT@/${COMMIT}/' < PKGBUILD.in > PKGBUILD sudo libremakepkg EOF }