slackbuilds_ponce/desktop/bashrun2/doinst.sh
Mikko Värri 753e258778 desktop/bashrun2: Added (interactive bash application launcher)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2010-12-31 18:59:54 -06:00

14 lines
388 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/xdg/bashrun2/bashrun2.rc.new