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:
parent
af5eaf5edf
commit
fddbd11baa
6 changed files with 21 additions and 11 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue