coverage.sh: make sure we have a gzip compressed file by checking the first three magic bytes

This commit is contained in:
Johannes 'josch' Schauer 2020-01-04 00:36:21 +01:00
parent b3949f6f7a
commit 75609a0b55
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -453,6 +453,7 @@ export LC_ALL=C.UTF-8
adduser --gecos user --disabled-password user
sysctl -w kernel.unprivileged_userns_clone=1
runuser -u user -- $CMD --mode=unshare --variant=apt $DEFAULT_DIST /tmp/debian-chroot.tar.gz $mirror
printf '\037\213\010' | cmp --bytes=3 /tmp/debian-chroot.tar.gz -
tar -tf /tmp/debian-chroot.tar.gz | sort | diff -u tar1.txt -
rm /tmp/debian-chroot.tar.gz
END