1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

Meta: Implement proper checks for sudo alternatives

This introduces support for building with doas.
This commit is contained in:
Dominique Liberda 2023-07-08 06:31:05 +02:00 committed by Linus Groh
parent af5eaf5edf
commit fddbd11baa
6 changed files with 21 additions and 11 deletions

View file

@ -8,7 +8,7 @@ script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
if [ "$(id -u)" != 0 ]; then
set +e
${SUDO} -- sh -c "\"$0\" $* || exit 42"
${SUDO} "${SHELL}" -c -- "\"$0\" $* || exit 42"
case $? in
1)
die "this script needs to run as root"