move id check to lib.sh too
doesn't really matter, it's just an extra layer to ensure reliability, but "id" is pretty standard Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
62c25ac7ab
commit
6e1b8087c5
1
build
1
build
|
@ -24,7 +24,6 @@ linkname="${linkpath##*/}"
|
|||
|
||||
main()
|
||||
{
|
||||
x_ id -u 1>/dev/null 2>/dev/null
|
||||
[ $# -lt 1 ] && badcmd
|
||||
spath="script/$1"
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ install_packages()
|
|||
}
|
||||
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && install_packages $@ && return 0
|
||||
|
||||
id -u 1>/dev/null 2>/dev/null || $err "suid check failed (id -u)"
|
||||
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||
|
||||
# if "y": a coreboot target won't be built if target.cfg says release="n"
|
||||
|
|
Loading…
Reference in New Issue