From fe5e8c11bd6caaf029a2db1c3f222367f7a2f2a1 Mon Sep 17 00:00:00 2001 From: Zhu Qun-Ying Date: Sat, 18 Oct 2014 06:29:34 +0700 Subject: system/pommed-light: Added (Apple laptops hotkeys events handler). Signed-off-by: Willy Sudiarto Raharjo --- system/pommed-light/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 system/pommed-light/doinst.sh (limited to 'system/pommed-light/doinst.sh') 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 -- cgit v1.2.3