add doas support

This commit is contained in:
Owen Rafferty 2020-01-14 21:20:27 -06:00
parent c8de8500f4
commit d87d64bf05
No known key found for this signature in database
GPG Key ID: 23A84C0A3681D40D

5
kiss
View File

@ -852,6 +852,9 @@ pkg_updates() {
if command -v sudo >/dev/null; then if command -v sudo >/dev/null; then
sudo git fetch sudo git fetch
sudo git merge sudo git merge
elif command -v doas >/dev/null; then
doas git fetch
doas git merge
else else
su -c 'git fetch && git merge' su -c 'git fetch && git merge'
fi fi
@ -967,6 +970,8 @@ args() {
[ "$(id -u)" = 0 ] || { [ "$(id -u)" = 0 ] || {
if command -v sudo >/dev/null; then if command -v sudo >/dev/null; then
sudo -E KISS_FORCE="$KISS_FORCE" kiss "$action" "$@" sudo -E KISS_FORCE="$KISS_FORCE" kiss "$action" "$@"
elif command -v doas >/dev/null; then
doas KISS_FORCE="$KISS_FORCE" kiss "$action" "$@"
else else
su -pc "KISS_FORCE=$KISS_FORCE kiss $action $*" su -pc "KISS_FORCE=$KISS_FORCE kiss $action $*"
fi fi