mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-28 10:02:43 +01:00
f33a4a4bcb
Looking at a1437bd04f
, it appears that I probably left that
config() bit in doinst.sh accidentally as a leftover from an
earlier idea of how to handle the config-ish file, and since
I completely forgot about the mere presence of the doinst.sh
script in the build script itself, I certainly didn't go back
and proof the postinstall afterward. Hey, nobody's perfect,
right? :-)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
17 lines
478 B
Bash
17 lines
478 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...
|
|
}
|
|
|
|
if [ -x /usr/bin/update-desktop-database ]; then
|
|
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
|
fi
|
|
|