summaryrefslogtreecommitdiff
path: root/system/flexbackup/doinst.sh
diff options
context:
space:
mode:
authorklaatu <klaatu@member.fsf.org>2013-06-30 01:09:27 -0500
committerErik Hanson <erik@slackbuilds.org>2013-06-30 01:09:27 -0500
commit28a41c331f37275da70b1ca844227f37c7c2be5f (patch)
treed992701049334b7d2f2346c4d4af8aab54acb688 /system/flexbackup/doinst.sh
parent05fb5f2bc2c6114d18a28bc3b536056759dd080d (diff)
downloadslackbuilds-28a41c331f37275da70b1ca844227f37c7c2be5f.tar.gz
system/flexbackup: Added (a flexible backup tool)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/flexbackup/doinst.sh')
-rw-r--r--system/flexbackup/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/flexbackup/doinst.sh b/system/flexbackup/doinst.sh
new file mode 100644
index 0000000000..e8837a3cde
--- /dev/null
+++ b/system/flexbackup/doinst.sh
@@ -0,0 +1,14 @@
+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/flexbackup.conf.new