feat: Remove leading and trailing spaces from VERSION (#294)

This commit is contained in:
Kroese 2025-09-15 14:18:24 +02:00 committed by GitHub
parent 9fb20e6ef5
commit 27a66f4748
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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