diff options
author | Симон Болоканов <sbolokanov@abv.bg> | 2016-04-03 17:50:44 +0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2016-04-03 21:44:59 -0500 |
commit | a60d6cca8dd55484ea26f9ebdfc2325df901c384 (patch) | |
tree | fa1975efd6f64506f97b27b44eedc71399d20d8b /desktop/dunst/doinst.sh | |
parent | 6a1f8e473713af22d746cf0f0e86419577a64ec0 (diff) | |
download | slackbuilds-a60d6cca8dd55484ea26f9ebdfc2325df901c384.tar.gz |
desktop/dunst: don't clobber config, info update
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop/dunst/doinst.sh')
-rw-r--r-- | desktop/dunst/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/dunst/doinst.sh b/desktop/dunst/doinst.sh new file mode 100644 index 0000000000..c3a0ab28b9 --- /dev/null +++ b/desktop/dunst/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/xdg/dunst/dunstrc.new |