blob: f91bafdb117439fa3448fe278856171d5096c155 [file] [log] [blame]
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001#!/bin/sh
2#
3# SPDX-License-Identifier: MIT
4#
5
6set -eu
7
8# Create a temporary man_db.conf with paths to the rootfs, as mandb needs absolute paths
9CONFIG=$(mktemp --tmpdir update-mandb.XXXXX)
10sed "s:\(\s\)/:\1$D/:g" $D${sysconfdir}/man_db.conf > $CONFIG
11
Andrew Geissler220dafd2023-10-04 10:18:08 -050012mkdir -p $D${localstatedir}/cache/man/
13
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050014PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${bindir}/mandb --config-file $CONFIG --create
15
16rm -f $CONFIG
17
18chown -R man:man $D${localstatedir}/cache/man/