SlackBuildsOrg/misc/html2ps/doinst.sh
Robby Workman f33a4a4bcb misc/html2ps: Fix leftover cruft in doinst.sh ; rm bashisms
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>
2014-09-13 08:01:13 +07:00

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