2023-08-27 16:57:30 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# SPDX-License-Identifier: MIT
|
2023-09-25 01:19:30 +00:00
|
|
|
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
|
2023-08-27 16:57:30 +00:00
|
|
|
|
|
|
|
. "include/err.sh"
|
|
|
|
|
2023-09-03 14:00:18 +00:00
|
|
|
read projectname < projectname
|
2023-08-27 16:57:30 +00:00
|
|
|
|
|
|
|
main()
|
|
|
|
{
|
|
|
|
which git 1>/dev/null 2>/dev/null || \
|
|
|
|
fail "git not installed. please install git-scm."
|
|
|
|
git config --global user.name 1>/dev/null 2>/dev/null || \
|
|
|
|
fail "git config --global user.name \"John Doe\""
|
|
|
|
git config --global user.email 1>/dev/null 2>/dev/null || \
|
|
|
|
fail "git config --global user.email \"john.doe@example.com\""
|
|
|
|
}
|
|
|
|
|
|
|
|
fail()
|
|
|
|
{
|
|
|
|
printf "You must configure Git, before using %s's build system. Do:\n" \
|
|
|
|
"${projectname}" 1>&2
|
2023-09-09 21:46:13 +00:00
|
|
|
printf "%s\n\n" "${1}" 1>&2
|
2023-08-27 16:57:30 +00:00
|
|
|
err "Misconfigured git-scm"
|
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|