Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/.gitlab/ci/build-inside-vm.sh
diff options
context:
space:
mode:
authorJonathon Fernyhough <jonathon@m2x.dev>2021-03-04 20:58:59 +0000
committerDavid Runge <dvzrv@archlinux.org>2021-03-14 17:42:54 +0000
commitf502b56ec2518cb2f3a6bd687683a09c0cd07712 (patch)
tree0fa4cfe58309a72dcb2a8634d93d67b57e472652 /.gitlab/ci/build-inside-vm.sh
parentbc67933af14c28eb385b537a6afa3aa6e458af59 (diff)
Create zsync control file for delta downloads
Diffstat (limited to '.gitlab/ci/build-inside-vm.sh')
-rwxr-xr-x.gitlab/ci/build-inside-vm.sh10
1 files changed, 10 insertions, 0 deletions
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