From 1b02b22b8e19803536ed2f7e573d1896cf0c460e Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Sun, 26 Jul 2015 08:14:45 +0700 Subject: python/pydf: Added (df clone written in python). Signed-off-by: Willy Sudiarto Raharjo --- python/pydf/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 python/pydf/doinst.sh (limited to 'python/pydf/doinst.sh') 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 -- cgit v1.2.3-80-g2a13