summaryrefslogtreecommitdiff
path: root/desktop/wmbutton/doinst.sh
diff options
context:
space:
mode:
authorMichael Heras <userxbw@gmail.com>2018-02-23 06:18:07 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-02-24 06:55:39 +0700
commit1a996aa2859eb6ad7b83c808733c98d784c8b15f (patch)
treea9b51571c42c88547b7602c96812617f3cb1d1a4 /desktop/wmbutton/doinst.sh
parent9186f76d6a327efd5959bd168b00dfb2a6294fe3 (diff)
downloadslackbuilds-1a996aa2859eb6ad7b83c808733c98d784c8b15f.tar.gz
desktop/wmbutton: Added (3 button actions).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/wmbutton/doinst.sh')
-rw-r--r--desktop/wmbutton/doinst.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop/wmbutton/doinst.sh b/desktop/wmbutton/doinst.sh
new file mode 100644
index 0000000000..df0732a365
--- /dev/null
+++ b/desktop/wmbutton/doinst.sh
@@ -0,0 +1,18 @@
+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/wmbutton.conf.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi