kiss: Split git into 3 commands if running under doas/sudo

This commit is contained in:
Dylan Araps 2020-02-09 14:30:27 +02:00
parent 529b93745f
commit 9f8c04c3b7
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

7
kiss
View File

@ -1090,8 +1090,11 @@ pkg_updates() {
log "Dropping permissions to $user for pull"
case $su in
su) as_root "$pull" ;;
*) as_root sh -c "$pull" ;;
su) as_root "$pull" ;;
*) as_root git fetch
as_root git diff > "$mak_dir/log"
as_root git merge
esac
)
fi