mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 22:45:55 -04:00
Skip empty detectors
Without this patch, output had ugly messages
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
and with the patch, the rule file is more readable
because it omits
-# Logitech Powerplay Mat -
-#---------------------------------------------------------------#
-#---------------------------------------------------------------#
-# Quantum Mechanical Keyboard (QMK) -
-#---------------------------------------------------------------#
-#---------------------------------------------------------------#
This commit is contained in:
committed by
Adam Honse
parent
a7920c01d7
commit
9ac44192bc
@@ -80,7 +80,7 @@ do
|
||||
type=$(printf %s "$DATA" | grep @type | sed -e 's/@type//g' -e 's/^ *//g')
|
||||
detectors=$(printf %s "$DATA" | grep @detectors | sed -e 's/@detectors *//g' -e 's/^ *//g' -e 's/\,/\n/g')
|
||||
|
||||
if [[ $type = USB || $type = Serial ]]; then #Check that the type is USB
|
||||
if [[ -n "$detectors" ]] && [[ $type = USB || $type = Serial ]]; then #Check that the type is USB
|
||||
## Iterate over the comma seperated detector function list
|
||||
while read -r detector
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user