aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-05-28 00:01:51 +0000
committermerakor <cem@ckyln.com>2020-05-28 00:01:51 +0000
commitc3c4956f0183cfc4d44d918ab4ece815899aa1b9 (patch)
treeed68d6887355dfe1197cf03245482619fa28abb5 /kiss
parent286a62f43781980f61aa467be93b891221751ca3 (diff)
downloadcpt-c3c4956f0183cfc4d44d918ab4ece815899aa1b9.tar.gz
kiss: add pre/post-remove hooks
FossilOrigin-Name: 21300ec66ba51f6d2566ba4e651aba3a9808ea797dedeec840633c8772f2c795
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss4
1 files changed, 4 insertions, 0 deletions
diff --git a/kiss b/kiss
index ebfbc8c..c4d6d34 100755
--- a/kiss
+++ b/kiss
@@ -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"
}