From b9b80f0b1bbce36b474776da4b76a3a567442650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sat, 6 Jan 2024 04:07:34 +0000 Subject: [PATCH] apeinstall.sh can run doas --- ape/apeinstall.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ape/apeinstall.sh b/ape/apeinstall.sh index 6037bf959..d8422e11a 100755 --- a/ape/apeinstall.sh +++ b/ape/apeinstall.sh @@ -18,8 +18,13 @@ fi if [ "$(id -u)" -eq 0 ]; then SUDO= -else +elif command -v sudo >/dev/null 2>&1; then SUDO=sudo +elif command -v doas >/dev/null 2>&1; then + SUDO=doas +else + echo "need root or sudo" >&2 + exit fi if command -v install >/dev/null 2>&1; then