#!/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" ./osi-mk \ --size=3G \ --package='base' \ --module=osi-mk.d/libretools.sh \ --module=osi-mk.d/systemd-dhcpcd.sh \ --module=osi-mk.d/systemd-osi-run.sh \ --directory="$workdir/systemd.git:/home/testuser/packages/srcdest/systemd" \ --directory="abs/systemd-232:/home/testuser/packages/abs/systemd-232" \ --directory="abs/systemd:/home/testuser/packages/abs/systemd" \ "${workdir}/build.raw" ./osi-run "${workdir}/build.raw" <<-EOF #!/usr/bin/env bash withtty() { local cmd printf -v cmd '%q ' "\$@" script --return --quiet --command "\$cmd" /dev/null } set -ex cd ~/packages/abs/systemd-232 withtty sudo libremakepkg cd ~/packages/abs/systemd sed 's/@COMMIT@/${COMMIT}/' < PKGBUILD.in > PKGBUILD withtty sudo libremakepkg EOF }