slackbuilds_ponce/network/axel/doinst.sh
Matthew Fillpot f16fb94d17 network/axel: Added (Download Accelerator)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-08-13 09:04:36 -03:00

14 lines
367 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/axelrc.new