summaryrefslogtreecommitdiffstats
path: root/python/pydf/doinst.sh
diff options
context:
space:
mode:
author Larry Hajali2015-07-26 03:14:45 +0200
committer Willy Sudiarto Raharjo2015-07-26 03:14:45 +0200
commit1b02b22b8e19803536ed2f7e573d1896cf0c460e (patch)
tree9e716fc59c62e5504108a2bc53bd504436ab9619 /python/pydf/doinst.sh
parentb77c61eee894fde524ff5873453d11fe7256920a (diff)
downloadslackbuilds-1b02b22b8e19803536ed2f7e573d1896cf0c460e.tar.gz
python/pydf: Added (df clone written in python).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/pydf/doinst.sh')
-rw-r--r--python/pydf/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/pydf/doinst.sh b/python/pydf/doinst.sh
new file mode 100644
index 0000000000..594df2ef42
--- /dev/null
+++ b/python/pydf/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/pydfrc.new