From 3a9eb312b1974db78ebb1bf170641298384a19b4 Mon Sep 17 00:00:00 2001 From: unknowndevQwQ Date: Wed, 5 Oct 2022 00:45:25 +0800 Subject: [PATCH] feat: add doas support (#5600) Some people may have some reason to drop sudo and switch to doas --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a954efbe..233c9226 100755 --- a/install.sh +++ b/install.sh @@ -553,6 +553,8 @@ sh_c() { sudo_sh_c() { if [ "$(id -u)" = 0 ]; then sh_c "$@" + elif command_exists doas; then + sh_c "doas $*" elif command_exists sudo; then sh_c "sudo $*" elif command_exists su; then @@ -561,7 +563,7 @@ sudo_sh_c() { echoh echoerr "This script needs to run the following command as root." echoerr " $*" - echoerr "Please install sudo or su." + echoerr "Please install doas, sudo, or su." exit 1 fi }