diff options
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,6 +1,8 @@ #!/usr/bin/env zsh # pkg - /home package manager and zsh playground +typeset -a -U triggers + ## ## Internal functions for displaying stuff ## @@ -373,11 +375,17 @@ update_provides () { for package in *; { if [[ -d $PDIR/$package ]] { [[ $2 = 'remove' ]] && rm -r $package - exec_hook $package 'post-update' + triggers+=$package } } } +apply_triggers () { + for package in $triggers; { + exec_hook $package 'post-update' + } +} + wrap () { function=$1 arg=$2 @@ -622,3 +630,5 @@ case $1 in upgrade) wrap pkg_upgrade "$2" "Looking for updates" ;; *) die "wait, what?\n" ;; esac + +apply_triggers |