From 27a66f4748619f49a805275abd919225e3d20413 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 15 Sep 2025 14:18:24 +0200 Subject: [PATCH] feat: Remove leading and trailing spaces from VERSION (#294) --- src/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/install.sh b/src/install.sh index 6d4a3b2..82943f0 100644 --- a/src/install.sh +++ b/src/install.sh @@ -211,6 +211,13 @@ generateSerial() { return 0 } +if [[ "${VERSION}" == \"*\" || "${VERSION}" == \'*\' ]]; then + VERSION="${VERSION:1:-1}" +fi + +VERSION=`expr "$VERSION" : "^\ *\(.*[^ ]\)\ *$"` +[ -z "$VERSION" ] && VERSION="13" + if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then ! download "$VERSION" && exit 34 fi