summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-04 09:57:42 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-04 09:57:42 +0100
commit727dc7ff2fdedc646cfc57c3e42d6ccf296ac8c8 (patch)
tree9e67f332142f475a770e50360635a70b0bfd220d /include
parentfbd464b4f795b82990edad4901f6812b10ca3260 (diff)
more verbosely print git config error
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/err.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/err.sh b/include/err.sh
index ac27d636..d949de11 100755
--- a/include/err.sh
+++ b/include/err.sh
@@ -13,9 +13,15 @@ check_git()
which git 1>/dev/null 2>/dev/null || \
err "git not installed. please install git-scm."
git config --global user.name 1>/dev/null 2>/dev/null || \
- err "git config --global user.name \"John Doe\""
+ git_err "git config --global user.name \"John Doe\""
git config --global user.email 1>/dev/null 2>/dev/null || \
- err "git config --global user.email \"john.doe@example.com\""
+ git_err "git config --global user.email \"john.doe@example.com\""
+}
+
+git_err()
+{
+ printf "You need to set git name/email, like so:\n%s\n\n" "${1}"
+ err "Git name/email not configured"
}
check_project()