summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/init.sh25
1 files changed, 21 insertions, 4 deletions
diff --git a/include/init.sh b/include/init.sh
index f8f0f910..5675f035 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -452,7 +452,7 @@ xbmk_set_mirror()
xbmk_git_init()
{
for gitarg in "user.name" "user.email"; do
- if [ "$2" != "-b" ]; then
+ if [ "${2-}" != "-b" ]; then
# we only need git name/email set for building
# coreboot. this is a bit of a hack, but it should
@@ -461,6 +461,21 @@ xbmk_git_init()
break
fi
+ if [ $# -gt 2 ] && [ "$3" != "coreboot" ]; then
+
+ # we still might run -b sometimes, for e.g.
+ # dependencies of ./mk inject. if -b is used
+ # but it's not for coreboot, don't check.
+
+ # coreboot is a multi-tree project, so the third
+ # argument will always be coreboot, when building
+ # with -b.
+
+ # we only need the git name/email check when
+ # doing ./mk -b coreboot
+
+ break
+ fi
gitcmd="git config --includes $gitarg"
if ! $gitcmd 1>/dev/null 2>/dev/null; then
err "Run this first: $gitcmd \"your ${gitcmd##*.}\"" \
@@ -486,10 +501,12 @@ xbmk_git_init()
x_ git init 1>/dev/null 2>/dev/null
x_ git add -A . 1>/dev/null 2>/dev/null
- x_ git commit -m "$projectname $version" --date "$cdate" \
+ x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
+ 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; :
+ x_ git -c user.name="xbmk" -c user.email="xbmk@example.com" \
+ tag -a "$version" -m "$projectname $version" \
+ 1>/dev/null 2>/dev/null; :
}
xbmk_child_exec()