void-packages/srcpkgs/plocate/files/pupdatedb
Duncaen f84af8e70c
plocate: better integration
* add _plocate group
* add locate alternative group
* simple pupdatedb script that does mupdatedb and plocate-build
* ship our own cron job that uses the _plocate group
2020-10-31 20:04:58 +01:00

8 lines
310 B
Bash

#!/bin/sh
# pupdatedb [database directory] - update a database for plocate
set -e
dbdir=${1:-${DBDIR:-/var/lib/mlocate}}
mupdatedb -o "${dbdir}/mlocate.db"
plocate-build "${dbdir}/mlocate.db" "${dbdir}/plocate.db.new"
chgrp _plocate "${dbdir}/plocate.db.new"
mv "${dbdir}/plocate.db.new" "${dbdir}/plocate.db"