aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-09 09:29:04 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-02-09 09:29:04 +0000
commit299593b1219f49806f2afccc91f9b7c0cf669dae (patch)
tree248ac99774bc11612e521d4fe57603f3257f38a9
parent1e19ef509402455cff9e25c565e390e43723e424 (diff)
downloadcpt-299593b1219f49806f2afccc91f9b7c0cf669dae.tar.gz
kiss: Don't keep logs around for updates. git does this for us.
FossilOrigin-Name: c93b23820dd58e774c85906801d68ffd72d1b765abae6e00260e648947686320
-rwxr-xr-xkiss17
1 files changed, 4 insertions, 13 deletions
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