diff options
author | merakor <cem@ckyln.com> | 2021-11-03 11:11:03 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-11-03 11:11:03 +0000 |
commit | 14c6c527e8bb97e780cef4f47fdf2f29d741ad0e (patch) | |
tree | 29014ecd3bbae5b6b1a41da4d7dc200996400d4c /examples/hooks/makewhatis | |
parent | 82091c4496d74c1ba8e7533ce3ef5871f8b71e32 (diff) | |
download | cpt-14c6c527e8bb97e780cef4f47fdf2f29d741ad0e.tar.gz |
add some hook examples
FossilOrigin-Name: 5b6f01a9c9d80dcee6444d8ad23839eb1fa9546c30dfb4f83350c2bbab44fab7
Diffstat (limited to 'examples/hooks/makewhatis')
-rw-r--r-- | examples/hooks/makewhatis | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/hooks/makewhatis b/examples/hooks/makewhatis new file mode 100644 index 0000000..5c38001 --- /dev/null +++ b/examples/hooks/makewhatis @@ -0,0 +1,10 @@ +# -*- mode: sh; -*- +# Run makewhatis if a manual page is installed, or removed +case $TYPE in + post-install|pre-remove) + grep -q "^/usr/share/man/" "$DEST/manifest" && + run_makewhatis=1 + ;; + end-install|end-remove) + [ "$run_makewhatis" ] && makewhatis "$DEST/usr/share/man" +esac |