handle relative path for OPK keymaps

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2021-04-26 22:17:52 +02:00
parent 240b8fea15
commit fff025d51a
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ case "${1}" in
fi
for desktop_file in $(ls /opk/*.desktop 2>/dev/null); do
opk_keymap=$(grep FK-Keymap= "${desktop_file}" | cut -d '=' -f 2)
if [ "${opk_keymap:0:1}" != "/" ]; then
opk_keymap="/opk/${opk_keymap}"
fi
if [ -f "${opk_keymap}" ]; then
log "rom: LOAD ${opk_keymap}"
write_fifo "LOAD ${opk_keymap}"