diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-18 09:41:00 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-18 09:41:00 +0100 |
commit | ecd7f1d11ee6a6b061e49d1402ce6056cca93cb1 (patch) | |
tree | 1310b8985455e02a5e7292bd3f0b7524dd998347 | |
parent | 829bc02bf28543de25682bd9cd5fe07aa74dc11f (diff) |
.gitcheck: move logic out of main()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-x | .gitcheck | 33 |
1 files changed, 19 insertions, 14 deletions
@@ -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 |