#!/bin/bash

DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"

function error {
  echo -e "\\e[91m$1\\e[39m"
  exit 1
}

cd $HOME
#Download QEMU
wget https://archive.org/download/macos_921_qemu_rpi/qemu_5.2.50-1_arm64.deb || error 'Failed to Download QEMU!'
#Install QEMU
sudo apt install --fix-broken -y ./qemu_5.2.50-1_arm64.deb || error 'Failed to unstall QEMU!'
rm qemu_5.2.50-1_arm64.deb
