Skip to content

Commit

Permalink
Toolchain: Allow BuildQemu.sh to resume downloads
Browse files Browse the repository at this point in the history
Use -C option for curl to resume if a partially downloaded file already
exists.
  • Loading branch information
LucasChollet authored and linusg committed May 8, 2022
1 parent f9ec3b9 commit ebb35e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Toolchain/BuildQemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebb35e0

Please sign in to comment.