From f502b56ec2518cb2f3a6bd687683a09c0cd07712 Mon Sep 17 00:00:00 2001 From: Jonathon Fernyhough Date: Thu, 4 Mar 2021 20:58:59 +0000 Subject: Create zsync control file for delta downloads --- .gitlab/ci/build-inside-vm.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.gitlab/ci/build-inside-vm.sh') diff --git a/.gitlab/ci/build-inside-vm.sh b/.gitlab/ci/build-inside-vm.sh index dbaadea..151cc13 100755 --- a/.gitlab/ci/build-inside-vm.sh +++ b/.gitlab/ci/build-inside-vm.sh @@ -26,12 +26,22 @@ create_checksums() { fi } +create_zsync_delta() { + # create a zsync control file for a file + # $1: a file + zsyncmake -C -u "${1##*/}" -o "${1}".zsync "${1}" + if [ -n "${SUDO_UID:-}" ]; then + chown "${SUDO_UID}:${SUDO_GID}" "${1}".zsync + fi +} + run_mkarchiso() { # run mkarchiso # $1: template name mkdir -p "${output}/${1}" "${tmpdir}/${1}" ./archiso/mkarchiso -o "${output}/${1}" -w "${tmpdir}/${1}" -v "configs/${1}" create_checksums "${output}/${1}/"*.iso + create_zsync_delta "${output}/${1}/"*.iso } trap cleanup EXIT -- cgit v1.2.3-70-g09d2