From 1a996aa2859eb6ad7b83c808733c98d784c8b15f Mon Sep 17 00:00:00 2001 From: Michael Heras Date: Fri, 23 Feb 2018 06:18:07 +0700 Subject: desktop/wmbutton: Added (3 button actions). Signed-off-by: Willy Sudiarto Raharjo --- desktop/wmbutton/doinst.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 desktop/wmbutton/doinst.sh (limited to 'desktop/wmbutton/doinst.sh') 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 -- cgit v1.2.3