init.sh: only update version files on parent

don't update them on child instances, since it's a waste
of time; the lock file prevents further execution, so we
are just wasting time writing to disk.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-18 12:58:42 +01:00
parent 94437278dc
commit 99f09f25ef
2 changed files with 24 additions and 17 deletions
+7 -3
View File
@@ -15,13 +15,17 @@ remkdir()
mkrom_tarball()
{
printf "%s\n" "$version" > "$1/.version" || err "$1 !version"
printf "%s\n" "$versiondate" > "$1/.versiondate" || err "$1 !vdate"
update_xbmkver "$1"
mktarball "$1" "${1%/*}/${relname}_${1##*/}.tar.xz"
x_ rm -Rf "$1"
}
update_xbmkver()
{
printf "%s\n" "$version" > "$1/.version" || err "$1 !version"; :
printf "%s\n" "$versiondate" > "$1/.versiondate" || err "$1 !vdate"; :
}
mktarball()
{
printf "Creating tar archive '%s' from directory '%s'\n" "$2" "$1"