about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaper Mountain Studio <kodycze@gmail.com>2019-11-30 11:39:54 +0100
committerLeah Neukirchen <chneukirchen@gmail.com>2019-11-30 23:24:53 +0100
commit87a225c26e9046db5e552e6f78c1bd3d7eeb733b (patch)
tree2b0a68d512d3eb7cf82315729ca814cdcc59a6ea
parentf72938bf57a4077508158d42733d0ce8a2f9b7d5 (diff)
downloadxtools-87a225c26e9046db5e552e6f78c1bd3d7eeb733b.tar.gz
xtools-87a225c26e9046db5e552e6f78c1bd3d7eeb733b.tar.xz
xtools-87a225c26e9046db5e552e6f78c1bd3d7eeb733b.zip
xi: support doas
-rwxr-xr-xxi2
1 files changed, 2 insertions, 0 deletions
diff --git a/xi b/xi
index 8a8e2a8..a5cd21e 100755
--- a/xi
+++ b/xi
@@ -39,6 +39,8 @@ SUDO=
 if command -v sudo >/dev/null &&
    sudo -l | grep -q -e ' ALL$' -e xbps-install; then
 	SUDO=sudo
+elif command -v doas >/dev/null && [ -f /etc/doas.conf ]; then
+	SUDO=doas
 elif [ "$(whoami)" != root ]; then
 	SUDO='su root -c '\''"$@"'\'' -- -'
 fi