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