aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-remove
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpt-remove')
-rwxr-xr-xsrc/cpt-remove6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpt-remove b/src/cpt-remove
index cce3739..f5a5abf 100755
--- a/src/cpt-remove
+++ b/src/cpt-remove
@@ -10,7 +10,7 @@ parser_definition() {
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
-[ "$1" ] || { set -- "${PWD##*/}"; export CPT_PATH=${PWD%/*}:$CPT_PATH ;}
+[ "$1" ] || { set -- "${PWD##*/}"; export CPT_PATH="${PWD%/*}:$CPT_PATH" ;}
[ -w "$CPT_ROOT/" ] || [ "$uid" = 0 ] || {
as_root "$0" "$@"
@@ -20,3 +20,7 @@ if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
create_cache
pkg_order "$@"
for pkg in $redro; do pkg_remove "$pkg" "${CPT_FORCE:-check}"; done
+
+# After all the removals are finished, run an end-remove hook. There may
+# be some things that we may want to run, but not per package.
+run_hook end-remove "" "$CPT_ROOT"