diff options
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/update_mandb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/postinst-intercepts/update_mandb b/scripts/postinst-intercepts/update_mandb new file mode 100644 index 0000000000..a061bb426a --- /dev/null +++ b/scripts/postinst-intercepts/update_mandb | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # SPDX-License-Identifier: MIT | ||
4 | # | ||
5 | |||
6 | set -eu | ||
7 | |||
8 | # Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths | ||
9 | CONFIG=$(mktemp --tmpdir update-mandb.XXXXX) | ||
10 | sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG | ||
11 | |||
12 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create | ||
13 | |||
14 | rm -f $CONFIG | ||
15 | |||
16 | chown -R man:man $D${localstatedir}/cache/man/ | ||