.gitcheck: move logic out of main()

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-05-18 09:41:00 +01:00
parent 829bc02bf2
commit ecd7f1d11e
1 changed files with 19 additions and 14 deletions

View File

@ -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_placeholder()
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_git_credentials()
{
# Check if username and or email is set.
if ! git config user.name || git config user.email ; then