init.sh: Run git name/email check before init

Otherwise, it returns if init is already done, which
later leads to build errors in coreboot.

Signed-off-by: Leah Rowe <leah@libreboot.org>
25.04_branch
Leah Rowe 2025-05-04 16:49:30 +01:00
parent 23755c1748
commit edfa4a0ddd
1 changed files with 6 additions and 6 deletions

View File

@ -147,6 +147,11 @@ xbmk_set_version()
xbmk_git_init()
{
for gitarg in "--global user.name" "--global user.email"; do
gitcmd="git config $gitarg"; $gitcmd || err \
"Please run this first: $gitcmd \"your ${gitcmd##*.}\""
done
[ -L ".git" ] && return 1
[ -e ".git" ] && return 0
eval "`setvars "$(date -Rud @$versiondate)" cdate _nogit`"
@ -156,12 +161,7 @@ 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
for gitarg in "--global user.name" "--global user.email"; do
gitcmd="git config $gitarg"; $gitcmd || err \
"Please run this first: $gitcmd \"your ${gitcmd##*.}\""
done
2>/dev/null; :
}
xbmk_create_tmpdir()