Commit 07993aa4 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Check ISO size

parent f3dd2875
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,12 @@ fi

[ ! -f "$TMP" ] && echo "Failed to download ${BOOT}" && exit 61

SIZE=$(stat -c%s "$TMP")

if ((SIZE<1000000)); then
  echo "Invalid ISO file: Size is smaller than 1 MB." && exit 62
fi

FILE="$IMG/boot.img"

mv -f "$TMP" "$FILE"