9 lines
310 B
Bash
9 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"
|