From 7e3ebdeb7cd68c6222fbcb40463b40c270a16eab Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 23 Jan 2009 17:59:10 +0100 Subject: Added support for global hooks via .pkg.conf --- man/5/pkg.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'man/5') diff --git a/man/5/pkg.conf b/man/5/pkg.conf index b508807..7c7230a 100644 --- a/man/5/pkg.conf +++ b/man/5/pkg.conf @@ -45,6 +45,20 @@ Operate in debug mode if 1 If 1, automatically execute 'pkg update' before 'pkg push' and 'pkg remote-update' before 'pkg upgrade' +=item BI () {I} + +Define the global hook I, its I will be executed +together with pkg's global hooks; the name of the package for which the hook is +being executed will be given as first parameter and is accessible throug B<$1>. +The hook is just a zsh function, so you can use any valid syntax you want, +including newlines. +See zsh(1) for more + +Valid I names are: post-add, pre-update, post-update, pre-remove. +Note thatt post-add automatically executes post-update + +Example: pkg_hook_post-update () {clear_line; echo "Hello from package $1!"} + =back =head1 SEE ALSO -- cgit v1.2.3