Toolchain: Allow BuildQemu.sh to resume downloads

Use -C option for curl to resume if a partially downloaded file already
exists.
This commit is contained in:
Lucas CHOLLET 2022-04-26 12:09:49 +02:00 committed by Linus Groh
parent f9ec3b986e
commit ebb35e03be
Notes: sideshowbarker 2024-07-17 11:08:03 +09:00

View file

@ -20,8 +20,9 @@ echo SYSROOT is "$SYSROOT"
mkdir -p "$DIR/Tarballs"
pushd "$DIR/Tarballs"
if [ ! -e "$QEMU_VERSION.tar.xz" ]; then
curl -O "https://download.qemu.org/$QEMU_VERSION.tar.xz"
md5="$(md5sum $QEMU_VERSION.tar.xz | cut -f1 -d' ')"
if [ ! -e "$QEMU_VERSION.tar.xz" ] || [ "$md5" != "$QEMU_MD5SUM" ]; then
curl -C - -O "https://download.qemu.org/$QEMU_VERSION.tar.xz"
else
echo "Skipped downloading $QEMU_VERSION"
fi