aboutsummaryrefslogtreecommitdiff
path: root/examples/hooks/makewhatis
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hooks/makewhatis')
-rw-r--r--examples/hooks/makewhatis10
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