Last active
November 3, 2018 14:12
-
-
Save imdurgadas/b07a1b1cf310cd1b6fc845361238d38d to your computer and use it in GitHub Desktop.
Get QEMU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARCHS=(arm s390x amd64 ppc64le) | |
QEMUARCHS=(arm s390x x86_64 ppc64le) | |
QEMUVER="v2.12.0-1" | |
get-qemu() { | |
if [[ ! $(find . -name "*qemu-*") ]]; then | |
echo "Downloading Qemu " | |
for target_arch in ${QEMUARCHS[*]}; do | |
if ! curl -OLs "https://github.com/multiarch/qemu-user-static/releases/download/$QEMUVER/x86_64_qemu-${target_arch}-static.tar.gz"; then | |
echo "Error downloading Qemu" | |
exit | |
fi | |
tar -xvf x86_64_qemu-"${target_arch}"-static.tar.gz | |
done | |
rm -f x86_64_qemu-* | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment