aboutsummaryrefslogtreecommitdiff
path: root/system/glances/doinst.sh
diff options
context:
space:
mode:
authorPhilip Lacroix <slackph at posteo dot de>2017-02-12 07:35:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-18 07:54:02 +0700
commit3e78bf4a382010101ab09a23b1194e678f722b77 (patch)
treefef742cf1f0fe6c60115b78747d85364cc807e2e /system/glances/doinst.sh
parentd57fd6a94440b4da2a7dfccf0da3ae86c15c3971 (diff)
system/glances: Updated for version 2.8.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/glances/doinst.sh')
-rw-r--r--system/glances/doinst.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/glances/doinst.sh b/system/glances/doinst.sh
new file mode 100644
index 0000000000000..589723e01ad73
--- /dev/null
+++ b/system/glances/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config /etc/glances.conf.new