init.sh: move git name/mail check to xbmk_git_init

the command -v check has been removed, since this function
already calls git immediately, which would accomplish the
same thing since that causes an error if git isn't there.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-04-26 22:54:43 +01:00
parent ea081adc4c
commit 9cebda333d
+4 -5
View File
@@ -165,10 +165,6 @@ xbmk_set_version()
eval "[ ! -f \".$fv\" ] || read -r $fv < \".$fv\" || :"
done
x_ command -v git
x_ git config --global user.name
x_ git config --global user.email
[ -e ".git" ] || [ -f ".version" ] || printf "unknown\n" > .version \
|| $err "Cannot generate unknown .version file"
[ -e ".git" ] || [ -f ".versiondate" ] || printf "1716415872\n" > \
@@ -200,7 +196,10 @@ xbmk_git_init()
x_ git commit -m "$projectname $version" --date "$cdate" \
--author="xbmk <xbmk@example.com>" 1>/dev/null 2>/dev/null
x_ git tag -a "$version" -m "$projectname $version" 1>/dev/null \
2>/dev/null; :
2>/dev/null
x_ git config --global user.name
x_ git config --global user.email
}
xbmk_create_tmpdir()