slackbuilds_ponce/system/i8kutils/doinst.sh
Fabio Sangiovanni ddbd1b5259 system/i8kutils: Added (utilities for Dell Inspiron and Latitude laptops)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-06-04 00:11:27 -05:00

13 lines
374 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/i8kmon.conf.new