mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
v4l-utils: refactor multi-keymap creation
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
7f9926ef6b
commit
2768ded009
@ -54,8 +54,22 @@ makeinstall_target() {
|
||||
fi
|
||||
}
|
||||
|
||||
create_multi_keymap() {
|
||||
local f name protocols
|
||||
name="$1"
|
||||
protocols="$2"
|
||||
shift 2
|
||||
(
|
||||
echo "# table $name, type: $protocols"
|
||||
for f in "$@" ; do
|
||||
echo "# $f"
|
||||
grep -v "^#" $INSTALL/usr/lib/udev/rc_keymaps/$f
|
||||
done
|
||||
) > $INSTALL/usr/lib/udev/rc_keymaps/$name
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
local f keymap
|
||||
local default_multi_maps f keymap
|
||||
|
||||
rm -rf $INSTALL/etc/rc_keymaps
|
||||
ln -sf /storage/.config/rc_keymaps $INSTALL/etc/rc_keymaps
|
||||
@ -78,13 +92,11 @@ post_makeinstall_target() {
|
||||
done
|
||||
)
|
||||
|
||||
(
|
||||
echo "# table libreelec_multi, type: RC6 NEC"
|
||||
for f in rc6_mce xbox_360 zotac_ad10 hp_mce xbox_one cubox_i ; do
|
||||
echo "# $f"
|
||||
grep -v "^#" $INSTALL/usr/lib/udev/rc_keymaps/$f
|
||||
done
|
||||
) > $INSTALL/usr/lib/udev/rc_keymaps/libreelec_multi
|
||||
# create multi keymap to support several remotes OOTB
|
||||
|
||||
default_multi_maps="rc6_mce xbox_360 zotac_ad10 hp_mce xbox_one cubox_i"
|
||||
|
||||
create_multi_keymap libreelec_multi "RC6 NEC" $default_multi_maps
|
||||
|
||||
# use multi-keymap instead of default one
|
||||
sed -i '/^\*\s*rc-rc6-mce\s*rc6_mce/d' $INSTALL/etc/rc_maps.cfg
|
||||
|
Loading…
x
Reference in New Issue
Block a user