Meta: Remove dependency on sudo, doas or pls

This commit is contained in:
Nathan E. Egge 2024-06-05 11:32:31 -04:00 committed by Tim Flynn
parent f721230456
commit e62f0a8da3
Notes: sideshowbarker 2024-07-17 06:33:00 +09:00

View file

@ -11,22 +11,6 @@ die() {
exit 1
}
if [ "$(uname -s)" = "SerenityOS" ]; then
SUDO="pls -E"
elif command -v sudo >/dev/null; then
SUDO="sudo -E"
elif command -v doas >/dev/null; then
if [ "$SUDO_UID" = '' ]; then
SUDO_UID=$(id -u)
SUDO_GID=$(id -g)
export SUDO_UID SUDO_GID
fi
# To make doas work, you have to make sure you use the "keepenv" flag in doas.conf
SUDO="doas"
else
die "You need sudo, doas or pls to build Serenity..."
fi
exit_if_running_as_root() {
if [ "$(id -u)" -eq 0 ]; then
die "$*"