aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-09 12:30:26 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-09 12:30:26 +0000
commit49d29ddf11a279c01401ed7f4575f1d5de948d8d (patch)
tree99113bd78d43770ead6ebe349363d7bfe548f32b
parent86aae158ad2dbe3df70753102c28f3eb5bdbb90e (diff)
downloadcpt-49d29ddf11a279c01401ed7f4575f1d5de948d8d.tar.gz
kiss: Split git into 3 commands if running under doas/sudo
FossilOrigin-Name: 491dc7ee674ee382e141d097f0f94cc9a958ef33442548861dccb84e754d039b
-rwxr-xr-xkiss7
1 files changed, 5 insertions, 2 deletions
diff --git a/kiss b/kiss
index 3a3539f..7c01bf4 100755
--- a/kiss
+++ b/kiss
@@ -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