option.sh: delete check_git()
it's only used from main() in the main build script, and it's very small, as is main() therefore, move the logic into main() Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
313c4c01e0
commit
c6ba0a0e9b
9
build
9
build
|
@ -29,7 +29,14 @@ main()
|
|||
|
||||
[ "$1" = "dependencies" ] && x_ install_packages $@ && lbmk_exit 0
|
||||
|
||||
for cmd in initcmd check_git git_init excmd; do
|
||||
which git 1>/dev/null 2>/dev/null || \
|
||||
git_err "git not installed. please install git-scm."
|
||||
git config --global user.name 1>/dev/null 2>/dev/null || \
|
||||
git_err "git config --global user.name \"John Doe\""
|
||||
git config --global user.email 1>/dev/null 2>/dev/null || \
|
||||
git_err "git config --global user.email \"john.doe@example.com\""
|
||||
|
||||
for cmd in initcmd git_init excmd; do
|
||||
eval "${cmd} \$@"
|
||||
done
|
||||
lbmk_exit 0
|
||||
|
|
|
@ -152,16 +152,6 @@ remkdir()
|
|||
mkdir -p "${1}" || $err "remkdir: !mkdir -p \"${1}\""
|
||||
}
|
||||
|
||||
check_git()
|
||||
{
|
||||
which git 1>/dev/null 2>/dev/null || \
|
||||
git_err "git not installed. please install git-scm."
|
||||
git config --global user.name 1>/dev/null 2>/dev/null || \
|
||||
git_err "git config --global user.name \"John Doe\""
|
||||
git config --global user.email 1>/dev/null 2>/dev/null || \
|
||||
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" 1>&2
|
||||
|
|
Loading…
Reference in New Issue