slackbuilds_ponce/misc/xapian-omega/doinst.sh
Robby Workman fd3959b6dd misc/xapian-omega: Fixed numerous packaging issues
Thanks to Charles (maintainer) and upstream for all of
the help with this.  Hopefully we've got it right this
time  :-)

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2011-01-30 09:15:31 -06:00

14 lines
381 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/xapian-omega.conf.new