diff options
author | Patrick Volkerding <volkerdi@slackware.com> | 2020-10-24 01:31:12 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-24 08:14:53 +0700 |
commit | 4a5150b387f6c8e829ee0d65f575ce45f59d33c7 (patch) | |
tree | a29f100a34dd9badeeac8b13b5a68b77a446a8ef /misc/g810-led/doinst.sh | |
parent | 5d899985224ff12db761c048568d08c91df19756 (diff) |
misc/g810-led: Added (LED controller for Logitech Gx10 keyboards)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/g810-led/doinst.sh')
-rw-r--r-- | misc/g810-led/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/g810-led/doinst.sh b/misc/g810-led/doinst.sh new file mode 100644 index 0000000000000..46961bfb1dd4d --- /dev/null +++ b/misc/g810-led/doinst.sh @@ -0,0 +1,15 @@ +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/g810-led/profile.new +config etc/g810-led/reboot.new |