Add wrapped hidapi devices to udev rules
This commit is contained in:
parent
3c7f53b544
commit
b072b508ae
1 changed files with 2 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ echo -e "$UDEV_HEADER" > "$UDEV_FILE"
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
echo -e "Creating device list"
|
echo -e "Creating device list"
|
||||||
HID_LIST=$(grep -hR -e "static\ HIDDeviceDetector" . | cut -d '(' -f 2- | awk -F , '{ print $2 ":|" $3 "|" $4 "|" $1 "|" }')
|
HID_LIST=$(grep -hR -e "static\ HIDDeviceDetector" . | cut -d '(' -f 2- | awk -F , '{ print $2 ":|" $3 "|" $4 "|" $1 "|" }')
|
||||||
|
HID_WRAPPER_LIST=$(grep -hR -e "static\ HIDWrappedDeviceDetector" . | cut -d '(' -f 2- | awk -F , '{ print $2 ":|" $3 "|" $4 "|" $1 "|" }')
|
||||||
DUMMY_LIST=$( grep -hR -e DUMMY_DEVICE_DETECTOR ${CONTROLLER_PATH} | cut -d '(' -f 2- | cut -d ')' -f 1 | awk -F , '{ print $2 ":|" $3 "|" $4 "|" $1 "|" }')
|
DUMMY_LIST=$( grep -hR -e DUMMY_DEVICE_DETECTOR ${CONTROLLER_PATH} | cut -d '(' -f 2- | cut -d ')' -f 1 | awk -F , '{ print $2 ":|" $3 "|" $4 "|" $1 "|" }')
|
||||||
|
|
||||||
#Check the output of the hid_list
|
#Check the output of the hid_list
|
||||||
|
|
@ -84,7 +85,7 @@ do
|
||||||
while read -r detector
|
while read -r detector
|
||||||
do
|
do
|
||||||
#Filter the list for all devices that use this detector
|
#Filter the list for all devices that use this detector
|
||||||
text=$(printf '%s\n%s' "$HID_LIST" "$DUMMY_LIST" | grep ${detector} | cut -d: -f 2- | sed -e 's/"//g')
|
text=$(printf '%s\n%s' "$HID_LIST" "$HID_WRAPPER_LIST" "$DUMMY_LIST" | grep ${detector} | cut -d: -f 2- | sed -e 's/"//g')
|
||||||
|
|
||||||
#Replace the detector string with the list of devices
|
#Replace the detector string with the list of devices
|
||||||
detectors=${detectors/${detector}/${text}}
|
detectors=${detectors/${detector}/${text}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue