live-build/share/hooks/normal/5030-update-plocate-databas...

22 lines
449 B
Bash
Executable File

#!/bin/sh
set -e
# Update the [mp]locate database.
#
# It is convenient for this to be already up to date on the live system, and it
# means that if the live system is later installed to a hard disk then less
# work will be required after installation.
# Up to Bullseye: mlocate
if command -v updatedb.mlocate >/dev/null
then
updatedb.mlocate
fi
# Bookworm and later: plocate
if command -v updatedb.plocate >/dev/null
then
updatedb.plocate
fi