Create zsync control file for delta downloads
This commit is contained in:
parent
bc67933af1
commit
f502b56ec2
@ -140,7 +140,7 @@ function main() {
|
||||
expect "# "
|
||||
|
||||
# Install required packages
|
||||
send "pacman -Syu --ignore linux --noconfirm --needed qemu-headless jq dosfstools e2fsprogs libisoburn mtools squashfs-tools\n"
|
||||
send "pacman -Syu --ignore linux --noconfirm --needed qemu-headless jq dosfstools e2fsprogs libisoburn mtools squashfs-tools zsync\n"
|
||||
expect "# " 120
|
||||
|
||||
## Start build and copy output to local disk
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user