slackbuilds_ponce/system/cdwrite/doinst.sh
Cezary M. Kruk ce538ef95c system/cdwrite: Added (CD/DVD reading/writing/encoding shell)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-08-09 12:53:56 -03:00

14 lines
376 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/cdwrite.conf.new