Boot image download
This commit is contained in:
parent
e825b8744e
commit
f3dd287528
1 changed files with 8 additions and 6 deletions
14
install.sh
14
install.sh
|
@ -1,18 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
FILE="$IMG/boot.img"
|
TMP="/boot.img"
|
||||||
rm -f "$FILE"
|
rm -f "$TMP"
|
||||||
|
|
||||||
echo "Downloading ${BOOT}..."
|
echo "Downloading ${BOOT}..."
|
||||||
|
|
||||||
# Check if running with interactive TTY or redirected to docker log
|
# Check if running with interactive TTY or redirected to docker log
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
wget "${BOOT}" -O "$FILE".tmp -q --no-check-certificate --show-progress
|
wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress --progress=bar:noscroll
|
||||||
else
|
else
|
||||||
wget "${BOOT}" -O "$FILE".tmp -q --no-check-certificate --show-progress --progress=dot:giga
|
wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress --progress=dot:giga
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -f "$FILE".tmp ] && echo "Failed to download ${BOOT}" && exit 61
|
[ ! -f "$TMP" ] && echo "Failed to download ${BOOT}" && exit 61
|
||||||
|
|
||||||
mv -f "$FILE".tmp "$FILE"
|
FILE="$IMG/boot.img"
|
||||||
|
|
||||||
|
mv -f "$TMP" "$FILE"
|
||||||
|
|
Loading…
Reference in a new issue