summaryrefslogtreecommitdiff
path: root/desktop/i3blocks/doinst.sh
diff options
context:
space:
mode:
authorAndre Fernando <ando344@gmail.com>2016-12-15 13:31:43 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-12-17 06:55:49 +0700
commit795577c257e02a4adba3816733ab5ee9a47ceea7 (patch)
tree1ff49c1625c2e0b79801e7c3654c33f03347e62b /desktop/i3blocks/doinst.sh
parent08a3def83cbc241a627ef95d777b2b52b626627d (diff)
downloadslackbuilds-795577c257e02a4adba3816733ab5ee9a47ceea7.tar.gz
desktop/i3blocks: Added (scheduler for i3bar blocks).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'desktop/i3blocks/doinst.sh')
-rw-r--r--desktop/i3blocks/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/i3blocks/doinst.sh b/desktop/i3blocks/doinst.sh
new file mode 100644
index 0000000000..c55a8b33af
--- /dev/null
+++ b/desktop/i3blocks/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/i3blocks.conf.new