diff options
author | Larry Hajali <larryhaja[at]gmail[dot]com> | 2015-07-26 08:14:45 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-07-26 08:14:45 +0700 |
commit | 1b02b22b8e19803536ed2f7e573d1896cf0c460e (patch) | |
tree | 9e716fc59c62e5504108a2bc53bd504436ab9619 /python/pydf/doinst.sh | |
parent | b77c61eee894fde524ff5873453d11fe7256920a (diff) |
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.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/pydf/doinst.sh b/python/pydf/doinst.sh new file mode 100644 index 0000000000000..594df2ef42f1a --- /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 |