From 299593b1219f49806f2afccc91f9b7c0cf669dae Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Sun, 9 Feb 2020 09:29:04 +0000 Subject: kiss: Don't keep logs around for updates. git does this for us. FossilOrigin-Name: c93b23820dd58e774c85906801d68ffd72d1b765abae6e00260e648947686320 --- kiss | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'kiss') diff --git a/kiss b/kiss index f1f107a..6aa0ce5 100755 --- a/kiss +++ b/kiss @@ -1037,7 +1037,7 @@ pkg_updates() { # Where to store repository diffs for the update. # At the same time, create the file so updates requiring root don't # overwrite the user's existing permissions over the log. - :> "${log_file:=$log_dir/update-$time-$pid}" + :> "$mak_dir/log" # Update each repository in '$KISS_PATH'. It is assumed that # each repository is 'git' tracked. @@ -1070,7 +1070,7 @@ pkg_updates() { if [ -w "$PWD" ] && [ "$(id -u)" != 0 ]; then git fetch - git diff >> "$log_file" + git diff >> "$mak_dir/log" git merge else @@ -1084,7 +1084,7 @@ pkg_updates() { # case that the repository is owned by a 3rd user. ( user=$(stat -c %U "$PWD") - pull="git fetch && git diff >>'$log_file' && git merge" + pull="git fetch && git diff >>'$mak_dir/log' && git merge" [ "$user" = root ] || log "Dropping permissions to $user for pull" @@ -1147,16 +1147,7 @@ pkg_updates() { # Show a diff of each new change to the repositories. # This spawns the user's set PAGER with a fallback to less. - # - # Disable this warning as the behavior (C may run when A is true) - # is intentional and fine. It is to prevent pager error from - # causing the package manager to abort. - # shellcheck disable=2015 - [ -s "$log_file" ] && { - log "Saved update log to $log_file" - - [ "$KISS_AUDIT" ] && "${PAGER:-less}" "$log_file" - } ||: + [ "$KISS_AUDIT" ] && "${PAGER:-less}" "$mak_dir/log" # Tell 'pkg_build' to always prompt before build. pkg_update=1 -- cgit v1.2.3