init.sh: error if version not read

we no longer rely on the .git version being
read by child instances, so we MUST ensure
that it is being read.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-18 13:08:49 +01:00
parent 99f09f25ef
commit 485a60e2f6
+2 -2
View File
@@ -52,8 +52,8 @@ xbmkpkg()
xbmk_get_version()
{
[ ! -f ".version" ] || read -r version < ".version" || :; :
[ ! -f ".versiondate" ] || read -r versiondate < ".versiondate" || :; :
[ ! -f ".version" ] || read -r version < ".version" || err
[ ! -f ".versiondate" ] || read -r versiondate < ".versiondate" || err
[ ! -e ".git" ] && [ ! -f ".version" ] && version="unknown"
[ ! -e ".git" ] && [ ! -f ".versiondate" ] && versiondate="1716415872"