diff options
author | merakor <cem@ckyln.com> | 2020-05-28 00:01:51 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-28 00:01:51 +0000 |
commit | c3c4956f0183cfc4d44d918ab4ece815899aa1b9 (patch) | |
tree | ed68d6887355dfe1197cf03245482619fa28abb5 | |
parent | 286a62f43781980f61aa467be93b891221751ca3 (diff) | |
download | cpt-c3c4956f0183cfc4d44d918ab4ece815899aa1b9.tar.gz |
kiss: add pre/post-remove hooks
FossilOrigin-Name: 21300ec66ba51f6d2566ba4e651aba3a9808ea797dedeec840633c8772f2c795
-rwxr-xr-x | kiss | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1046,6 +1046,8 @@ pkg_remove() { "$sys_db/$1/pre-remove" ||: fi + run_hook pre-remove "$1" "/var/db/kiss/installed/$1" + while read -r file; do # The file is in '/etc' skip it. This prevents the package # manager from removing user edited configuration files. @@ -1062,6 +1064,8 @@ pkg_remove() { # we no longer need to block 'Ctrl+C'. trap pkg_clean EXIT INT + run_hook post-remove "$1" "$KISS_ROOT/" + log "$1" "Removed successfully" } |