1
0
mirror of https://github.com/b4tman/armhf-alpine-qemu.git synced 2024-12-05 01:26:54 +00:00

qemu download script rewrited

This commit is contained in:
Dmitry Belyaev 2017-09-04 08:59:10 +03:00
parent 95a759c16f
commit fa87791e3b
Signed by: b4tman
GPG Key ID: 014E87EC54B77673

View File

@ -1,14 +1,16 @@
#!/bin/sh -ex
QEMU_VERSION="2.5.0-resin-rc3" QEMU_TARGET="arm"
QEMU_SHA256="107f0585f2b98a149b0ff013ec068ac24c6cfc402cd438b6da5251406bcd564c"
QEMU_URL="https://github.com/resin-io/qemu/releases/download/qemu-${QEMU_VERSION}-${QEMU_TARGET}/qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz"
QEMU_RELEASE_TAG="qemu-2.5.0-resin-rc3-arm"
QEMU_RELEASE_FILE="qemu-2.5.0-resin-rc3-arm.tar.gz"
QEMU_RELEASE_SHA256="107f0585f2b98a149b0ff013ec068ac24c6cfc402cd438b6da5251406bcd564c"
curl -SL $QEMU_URL -o qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz
echo "${QEMU_SHA256} qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz" > qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz.sha256sum
sha256sum -c qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz.sha256sum
rm -f qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz.sha256sum
QEMU_URL="https://github.com/resin-io/qemu/releases/download/${QEMU_RELEASE_TAG}/${QEMU_RELEASE_FILE}"
curl -fsSL ${QEMU_URL} -o ${QEMU_RELEASE_FILE}
rm -f qemu-${QEMU_TARGET}-static
tar --strip 1 -xzf qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz
rm -f qemu-${QEMU_VERSION}-${QEMU_TARGET}.tar.gz
echo "${QEMU_RELEASE_SHA256} ${QEMU_RELEASE_FILE}" > ${QEMU_RELEASE_FILE}.sha256sum
sha256sum -c ${QEMU_RELEASE_FILE}.sha256sum
rm -f ${QEMU_RELEASE_FILE}.sha256sum
rm -f qemu-arm-static
tar --strip 1 -xzf ${QEMU_RELEASE_FILE}
rm -f ${QEMU_RELEASE_FILE}