scripts/xemu-version.sh: Use 0.0.0 if version cannot be detected

This commit is contained in:
Matt Borgerson 2025-03-13 14:30:51 -07:00 committed by mborgerson
parent a143f66ce4
commit fac9ae83c7
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -eu
@ -26,6 +26,10 @@ XEMU_VERSION=$( \
cat XEMU_VERSION; \
fi)
if [[ "${XEMU_VERSION}" == "" ]]; then
XEMU_VERSION="0.0.0"
fi
get_version_field() {
echo ${XEMU_VERSION}-0 | cut -d- -f$1
}