aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-17 23:41:46 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-08-17 23:41:46 +0200
commit50f0aebb571aeaa57a003d30ec8dff0d72e325d5 (patch)
treeaa5c43341965700565936c089c0943d8b67c883a
parentb16ae932cf471a3dbb1f61aaad3279d758583e86 (diff)
downloaddotfiles-50f0aebb571aeaa57a003d30ec8dff0d72e325d5.tar.gz
update hooks
-rw-r--r--lib/funcs.sh3
-rw-r--r--lib/hooks.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/funcs.sh b/lib/funcs.sh
index 66786a0..b60ae89 100644
--- a/lib/funcs.sh
+++ b/lib/funcs.sh
@@ -90,6 +90,9 @@ link() {
fi
ln -s "$1" "$2"
+
+ call_hook "installed.$(basename $2)" "$2"
+ call_hook "installed" "$2"
}
choose_target() {
diff --git a/lib/hooks.sh b/lib/hooks.sh
index 2256914..408f084 100644
--- a/lib/hooks.sh
+++ b/lib/hooks.sh
@@ -12,7 +12,7 @@ call_hook() {
debug "Running hook $HOOK"
- hooks/$HOOK.hook 2>&1 | (while read line; do echo [hook: $HOOK] $line; done)
+ hooks/$HOOK.hook "$@" 2>&1 | (while read line; do echo [hook: $HOOK] $line; done)
RET=${PIPESTATUS[0]}
if [ $RET -ne 0 ]; then