From d91820834a1e6ad312313c85b2060e0090e284b1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 12 May 2020 11:37:24 +0300 Subject: [PATCH] kiss: Log and queue post-install messages --- kiss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index f72f372..bf22bf3 100755 --- a/kiss +++ b/kiss @@ -1303,9 +1303,9 @@ pkg_install() { trap pkg_clean EXIT INT if [ -x "$sys_db/$pkg_name/post-install" ]; then - log "$pkg_name" "Running post-install script" - "$sys_db/$pkg_name/post-install" ||: - fi + log "$pkg_name" "post-install log" + "$sys_db/$pkg_name/post-install" + fi 2>&1 | tee -a "$log_dir/post-install-$time-$pid" >/dev/null run_hook post-install "$pkg_name" "$sys_db/$pkg_name" @@ -1619,6 +1619,11 @@ args() { "$util" "$@" ;; esac + + if [ -s "$log_dir/post-install-$time-$pid" ]; then + cat "$log_dir/post-install-$time-$pid" + log "Post-install log stored to $log_dir/post-install-$time-$pid" + fi } main() {