fix: Detect version for custom image

This commit is contained in:
Kroese 2024-01-22 11:51:43 +01:00 committed by GitHub
parent ecf21e693d
commit 8d0c10f72f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,7 +136,7 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 )) SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))
if (( SIZE > SPACE )); then if (( SIZE > SPACE )); then
error "Not enough free space in $STORAGE, have $SPACE_GB GB available but need at least $SIZE_GB GB." && exit 63 echo && error "Not enough free space in $STORAGE, have $SPACE_GB GB available but need at least $SIZE_GB GB." && exit 63
fi fi
if [ -n "$CUSTOM" ]; then if [ -n "$CUSTOM" ]; then
@ -184,7 +184,9 @@ XML=""
if [[ "$MANUAL" != [Yy1]* ]]; then if [[ "$MANUAL" != [Yy1]* ]]; then
[[ "$EXTERNAL" != [Yy1]* ]] && XML="$VERSION.xml" if [[ "$EXTERNAL" != [Yy1]* ]]; then
[ -z "$CUSTOM" ] && XML="$VERSION.xml"
fi
if [ ! -f "/run/assets/$XML" ]; then if [ ! -f "/run/assets/$XML" ]; then
@ -298,7 +300,7 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 )) SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))
if (( SIZE > SPACE )); then if (( SIZE > SPACE )); then
error "Not enough free space in $STORAGE, have $SPACE_GB GB available but need at least $SIZE_GB GB." && exit 63 echo && error "Not enough free space in $STORAGE, have $SPACE_GB GB available but need at least $SIZE_GB GB." && exit 63
fi fi
MSG="Generating new ISO image for installation..." MSG="Generating new ISO image for installation..."