build: do root check before git check
otherwise, git could be initialised as root. running as root is not allowed. Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
8d199a31d1
commit
db06bbdb6e
4
build
4
build
|
@ -30,13 +30,13 @@ main()
|
|||
|
||||
[ "$1" = "dependencies" ] && x_ install_packages $@ && return 0
|
||||
|
||||
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||
|
||||
for g in "which git" "git config --global user.name" \
|
||||
"git config --global user.email" "git_init"; do
|
||||
eval "$g 1>/dev/null 2>/dev/null || git_err \"$g\""
|
||||
done
|
||||
|
||||
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||
|
||||
case "${1}" in
|
||||
version) printf "%s\n" "$relname" ;;
|
||||
release) shift 1; mkrelease $@ ;;
|
||||
|
|
Loading…
Reference in New Issue