Skip to content

Commit

Permalink
Toolchain: Fix qemu build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
lnzero1dev authored and awesomekling committed Jan 25, 2020
1 parent c8f61de commit 91b22e0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Toolchain/BuildQemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,21 @@ echo SYSROOT is "$SYSROOT"

mkdir -p "$DIR/Tarballs"

source "$DIR/UseIt.sh"

pushd "$DIR/Tarballs"

md5="$(md5sum $QEMU_VERSION.tar.xz | cut -f1 -d' ')"
echo "qemu md5='$md5'"
if [ ! -e "$QEMU_VERSION.tar.xz" ] || [ "$md5" != "$QEMU_MD5SUM" ] ; then
rm -f qemu-3.0.0.tar.xz
if [ ! -e "$QEMU_VERSION.tar.xz" ]; then
curl -O "https://download.qemu.org/$QEMU_VERSION.tar.xz"

if [ "$md5" != "$QEMU_MD5SUM" ] ; then
echo "qemu md5 sum mismatching, please run script again."
exit 1
fi
else
echo "Skipped downloading $QEMU_VERSION"
fi

md5="$(md5sum $QEMU_VERSION.tar.xz | cut -f1 -d' ')"
echo "qemu md5='$md5'"
if [ "$md5" != "$QEMU_MD5SUM" ] ; then
echo "qemu md5 sum mismatching, please run script again."
rm $$QEMU_VERSION.tar.xz
exit 1
fi

if [ ! -d "$QEMU_VERSION" ]; then
echo "Extracting qemu..."
tar -xf "$QEMU_VERSION.tar.xz"
Expand Down

0 comments on commit 91b22e0

Please sign in to comment.