build: simplify git checks
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
84ee6a1ed8
commit
687fdacc78
11
build
11
build
|
@ -28,13 +28,10 @@ main()
|
||||||
|
|
||||||
[ "$1" = "dependencies" ] && x_ install_packages $@ && return 0
|
[ "$1" = "dependencies" ] && x_ install_packages $@ && return 0
|
||||||
|
|
||||||
which git 1>/dev/null 2>/dev/null || \
|
for g in "which git" "git config --global user.name" \
|
||||||
git_err "git not installed. please install git-scm."
|
"git config --global user.email" "git_init"; do
|
||||||
git config --global user.name 1>/dev/null 2>/dev/null || \
|
eval "$g 1>/dev/null 2>/dev/null || git_err \"$g\""
|
||||||
git_err "git config --global user.name \"John Doe\""
|
done
|
||||||
git config --global user.email 1>/dev/null 2>/dev/null || \
|
|
||||||
git_err "git config --global user.email \"john.doe@example.com\""
|
|
||||||
git_init
|
|
||||||
|
|
||||||
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue