qemu-arm/install.sh
2023-04-15 18:17:10 +02:00

20 lines
471 B
Bash

#!/usr/bin/env bash
set -eu
TMP="/boot.img"
rm -f "$TMP"
echo "Downloading ${BOOT}..."
# Check if running with interactive TTY or redirected to docker log
if [ -t 1 ]; then
wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress --progress=bar:noscroll
else
wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress --progress=dot:giga
fi
[ ! -f "$TMP" ] && echo "Failed to download ${BOOT}" && exit 61
FILE="$IMG/boot.img"
mv -f "$TMP" "$FILE"