slackbuilds_ponce/network/onedrive/doinst.sh
Rob van Nues dabc3af7bf network/onedrive: Updated for version 2.3.13.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2020-01-02 23:33:51 -06:00

15 lines
385 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/logrotate.d/onedrive.new