Boot file
This commit is contained in:
parent
6a68767fbd
commit
0a1ccc7217
1 changed files with 7 additions and 13 deletions
20
install.sh
20
install.sh
|
@ -3,25 +3,19 @@ set -eu
|
||||||
|
|
||||||
IMG="/storage"
|
IMG="/storage"
|
||||||
[ ! -d "$IMG" ] && echo "Storage folder (${IMG}) not found!" && exit 69
|
[ ! -d "$IMG" ] && echo "Storage folder (${IMG}) not found!" && exit 69
|
||||||
[ -f "$IMG/boot.img" ] && exit 0
|
|
||||||
|
|
||||||
TMP="$IMG/tmp"
|
FILE="$IMG/boot.img"
|
||||||
|
[ -f "$FILE" ] && exit 0
|
||||||
|
|
||||||
echo "Install: Downloading $BOOT..."
|
echo "Downloading $BOOT..."
|
||||||
|
|
||||||
FILE="$TMP/boot.img"
|
|
||||||
rm -rf $TMP && mkdir -p $TMP
|
|
||||||
|
|
||||||
# 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" -q --no-check-certificate --show-progress
|
wget "$BOOT" -O "$FILE".tmp -q --no-check-certificate --show-progress
|
||||||
else
|
else
|
||||||
wget "$BOOT" -O "$FILE" -q --no-check-certificate --show-progress --progress=dot:giga
|
wget "$BOOT" -O "$FILE".tmp -q --no-check-certificate --show-progress --progress=dot:giga
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -f "$FILE" ] && echo "Download failed" && exit 61
|
[ ! -f "$FILE".tmp ] && echo "Download failed" && exit 61
|
||||||
|
|
||||||
mv -f "$BOOT" "$IMG"/boot.img
|
|
||||||
|
|
||||||
rm -rf $TMP
|
|
||||||
|
|
||||||
|
mv -f "$FILE".tmp "$FILE"
|
||||||
|
|
Loading…
Reference in a new issue