Unverified Commit 27a66f47 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

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

parent 9fb20e6e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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