summaryrefslogtreecommitdiff
path: root/.gitcheck
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-18 09:41:00 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-18 09:41:00 +0100
commitecd7f1d11ee6a6b061e49d1402ce6056cca93cb1 (patch)
tree1310b8985455e02a5e7292bd3f0b7524dd998347 /.gitcheck
parent829bc02bf28543de25682bd9cd5fe07aa74dc11f (diff)
.gitcheck: move logic out of main()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to '.gitcheck')
-rwxr-xr-x.gitcheck33
1 files changed, 19 insertions, 14 deletions
diff --git a/.gitcheck b/.gitcheck
index 0bc64fbc..451c516d 100755
--- a/.gitcheck
+++ b/.gitcheck
@@ -13,23 +13,28 @@ main()
clean
fi
else
- set_placeholder
-
- # Check coreboot as well to prevent errors during building
- if [ -d coreboot ]; then
- for x in coreboot/*; do
- if [ ! -d "${x}" ]; then
- continue
- fi
- cd "${x}"
- set_placeholder
- cd -
- done
- fi
+ set_placeholders
+ fi
+}
+
+set_placeholders()
+{
+ set_git_credentials
+
+ # Check coreboot as well to prevent errors during building
+ if [ -d coreboot ]; then
+ for x in coreboot/*; do
+ if [ ! -d "${x}" ]; then
+ continue
+ fi
+ cd "${x}"
+ set_git_credentials
+ cd -
+ done
fi
}
-set_placeholder()
+set_git_credentials()
{
# Check if username and or email is set.
if ! git config user.name || git config user.email ; then