diff options
author | Zhu Qun-Ying <zhu.qunying@gmail.com> | 2014-10-18 06:29:34 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-10-18 06:29:34 +0700 |
commit | fe5e8c11bd6caaf029a2db1c3f222367f7a2f2a1 (patch) | |
tree | df27fb493d5e0c09bd856fed166251e1aa40e8ed /system/pommed-light/doinst.sh | |
parent | 2bd0ba6a1ee367242f54a6a890a1191fb566f6bc (diff) |
system/pommed-light: Added (Apple laptops hotkeys events handler).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pommed-light/doinst.sh')
-rw-r--r-- | system/pommed-light/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/pommed-light/doinst.sh b/system/pommed-light/doinst.sh new file mode 100644 index 0000000000000..1e8713903f567 --- /dev/null +++ b/system/pommed-light/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/pommed.conf.new |