Merge pull request #84 from ioraff/master

add doas support
This commit is contained in:
dylan 2020-01-18 11:05:32 +02:00 committed by GitHub
commit 3ec05e936b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
kiss
View File

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