cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 9063e833255dee8b77b1f7f0241d04c7faa64387
parent 671942b1e232caf2e5e16c0b6913922189eac8e1
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 28 May 2020 03:01:51 +0300

kiss: add pre/post-remove hooks

Diffstat:
Mkiss | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git 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" }