mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
0b407b380e
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
25 lines
603 B
Bash
25 lines
603 B
Bash
config() {
|
|
NEW="$1"
|
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
|
if [ ! -r $OLD ]; then
|
|
mv $NEW $OLD
|
|
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
|
rm $NEW
|
|
fi
|
|
}
|
|
|
|
config etc/updatedb.conf.new
|
|
|
|
# If there's no locate link, take over:
|
|
if [ ! -r usr/bin/locate ]; then
|
|
( cd usr/bin ; ln -sf plocate locate )
|
|
fi
|
|
|
|
# same for these man pages
|
|
if [ ! -r usr/man/man5/updatedb.conf.5.gz ]; then
|
|
( cd usr/man/man5 ; ln -sf plocate-updatedb.conf.5.gz updatedb.conf.5.gz )
|
|
fi
|
|
|
|
if [ ! -r usr/man/man1/locate.1.gz ]; then
|
|
( cd usr/man/man1 ; ln -sf plocate.1.gz locate.1.gz )
|
|
fi
|