From 8d0c10f72f80fd1a1415f885c5369f4da823038d Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 22 Jan 2024 11:51:43 +0100 Subject: [PATCH] fix: Detect version for custom image --- src/install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/install.sh b/src/install.sh index 012e0a1..1872cfd 100644 --- a/src/install.sh +++ b/src/install.sh @@ -136,7 +136,7 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1) SPACE_GB=$(( (SPACE + 1073741823)/1073741824 )) 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 if [ -n "$CUSTOM" ]; then @@ -184,7 +184,9 @@ XML="" 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 @@ -298,7 +300,7 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1) SPACE_GB=$(( (SPACE + 1073741823)/1073741824 )) 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 MSG="Generating new ISO image for installation..."