diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-04 16:49:30 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-04 16:49:30 +0100 |
commit | 5e3aaa1eb8b6f0198723ca67cda07b0990744132 (patch) | |
tree | 800b1862bab27ad59f3f2212b59f27521576b365 /include/init.sh | |
parent | a3b5626f53db69ed22dc395221ba515d3f74b728 (diff) |
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>
Diffstat (limited to 'include/init.sh')
-rw-r--r-- | include/init.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/init.sh b/include/init.sh index 349d40ed..b9df34bb 100644 --- a/include/init.sh +++ b/include/init.sh @@ -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() |