getUuidForDevice()
This commit is contained in:
parent
fceb75dd31
commit
262f8cc5e6
|
@ -65,6 +65,14 @@ pluckUuid = (line) ->
|
|||
line.match(/\[(.+)\]/)[1]
|
||||
|
||||
|
||||
getUuidForDevice = (deviceName) ->
|
||||
device = getDeviceList().find (line) -> line.match deviceName
|
||||
unless device
|
||||
logErr "Cannot find device `#{deviceName}`"
|
||||
|
||||
pluckUuid device
|
||||
|
||||
|
||||
toUnderscored = (s) ->
|
||||
s.replace(camelRx, '$1_$2').toLowerCase()
|
||||
|
||||
|
|
Loading…
Reference in New Issue