vrahane commented on a change in pull request #2762:
URL: https://github.com/apache/mynewt-core/pull/2762#discussion_r799462719
##########
File path: hw/scripts/common.sh
##########
@@ -88,6 +88,14 @@ detect_programmer() {
# extract the VID:PID list for connected USB devices
USB_DEV=$(lsusb | cut -f6 -d' ')
+ elif [ $(which system_profiler) ] ; then
+
+ # extract the VID:PID list for connected USB devices on OSX
+ USB_DEV=$(system_profiler SPUSBDataType 2>/dev/null | awk '/^[
\t]+Product ID:/ { PID=$3 } /^[ \t]+Vendor ID:/ { printf("%s:%s\n", PID, $3) }')
Review comment:
@kasjer Functionality wise, might be fine but just from a style
perspective it is a very long line. In the entire script people have taken
efforts to reduce the length of the statements. So, I would expect the same
here. For example:
https://linuxhint.com/split-long-bash-command/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]