This repository has been archived by the owner. It is now read-only.

Lsusb utility for Mac OS X #23803

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
@jlhonora

lsusb - list all attached USB devices

lsusb is a Linux command that lists all devices currently
attached to the USB bus. Mac OS X doesn't have this command, but
provides the system_profiler SPUSBDataType utility. This formula
installsa script that emulates Linux's lsusb behaviour, while
providing similar functionality and syntax.

This version has been tested in Mac OS X 10.6-9, and should work
in any Mac system that provides the system_profiler command.

Note: This is my first Homebrew formula, I read the docs thoroughly, but I surely made lots of mistakes, please bear with me.

jlhonora added some commits Oct 30, 2013

Added a lsusb utility script
`lsusb` is a Linux command that lists all devices currently
attached to the USB bus. Mac OS X doesn't have this command, but
provides the `system_profiler SPUSBDataType` utility. This formula
installsa script that emulates Linux's lsusb behaviour, while
providing similar functionality and syntax.

This version has been tested in Mac OS X 10.6-9, and should work
in any Mac system that provides the `system_profiler` command.
Added man page
Added documentation for the lsusb command
@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 30, 2013

Contributor
Error Message

failed: brew audit lsusb
Error: 1 problems in 1 formulae
lsusb:
 * Trailing whitespace was found
Contributor

adamv commented Oct 30, 2013

Error Message

failed: brew audit lsusb
Error: 1 problems in 1 formulae
lsusb:
 * Trailing whitespace was found
Library/Formula/lsusb.rb
+
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/homebrew'
+ url 'https://raw.github.com/jlhonora/lsusb/fdf36d393881d0ba479988a8e890afdb6544753b/lsusb'

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 30, 2013

Contributor

We need to pull from a tagged tarball, not an arbitrary commit.

@adamv

adamv Oct 30, 2013

Contributor

We need to pull from a tagged tarball, not an arbitrary commit.

Library/Formula/lsusb.rb
+ depends_on 'wget'
+
+ def install
+ system "wget https://raw.github.com/jlhonora/lsusb/master/man/lsusb.1"

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 30, 2013

Contributor

Don't do this this way; use a URL to the tagged tarball, then install both files from that.

@adamv

adamv Oct 30, 2013

Contributor

Don't do this this way; use a URL to the tagged tarball, then install both files from that.

Library/Formula/lsusb.rb
+
+ def install
+ system "wget https://raw.github.com/jlhonora/lsusb/master/man/lsusb.1"
+ bin.install('lsusb')

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 30, 2013

Contributor

Drop parens.

@adamv

adamv Oct 30, 2013

Contributor

Drop parens.

Library/Formula/lsusb.rb
+ man1.install('lsusb.1')
+ end
+
+ test do

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 30, 2013

Contributor

If there is no good test, omit the test definition.

@adamv

adamv Oct 30, 2013

Contributor

If there is no good test, omit the test definition.

This comment has been minimized.

Show comment Hide comment
@jlhonora

jlhonora Oct 30, 2013

Thanks a lot for the suggestions (and patience)! Corrected these errors, hope that everything is OK now.

@jlhonora

jlhonora Oct 30, 2013

Thanks a lot for the suggestions (and patience)! Corrected these errors, hope that everything is OK now.

Corrected multiple homebrew errors
Corrected the following errors with previous pull request
commit. All pointed by 'adamv':

  * Fixed `brew audit` suggestions
  * Added a tarball instead of specific commits
  * No parentheses in calls, 'ala ruby'
  * Removed test
@jlhonora

This comment has been minimized.

Show comment Hide comment
@jlhonora

jlhonora Nov 8, 2013

All is well now, is there anything else I can help with to get it merged?

jlhonora commented Nov 8, 2013

All is well now, is there anything else I can help with to get it merged?

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Nov 8, 2013

Contributor

@MikeMcQuaid notability check please

Contributor

adamv commented Nov 8, 2013

@MikeMcQuaid notability check please

@MikeMcQuaid

This comment has been minimized.

Show comment Hide comment
@MikeMcQuaid

MikeMcQuaid Nov 8, 2013

Owner

Two months old, no tags, no forks. Sorry, we'll need to decline this for now. Please use a tap for now.

Owner

MikeMcQuaid commented Nov 8, 2013

Two months old, no tags, no forks. Sorry, we'll need to decline this for now. Please use a tap for now.

@MikeMcQuaid MikeMcQuaid closed this Nov 8, 2013

@jlhonora jlhonora referenced this pull request Nov 10, 2013

Closed

New formula: lsusb #24161

@rhyde

This comment has been minimized.

Show comment Hide comment
@rhyde

rhyde Aug 16, 2015

how does one get this via a tap?

rhyde commented Aug 16, 2015

how does one get this via a tap?

@DomT4

This comment has been minimized.

Show comment Hide comment
@DomT4

DomT4 Aug 16, 2015

Contributor

brew install jlhonora/lsusb/lsusb should work.

Contributor

DomT4 commented Aug 16, 2015

brew install jlhonora/lsusb/lsusb should work.

@DomT4 DomT4 locked and limited conversation to collaborators Aug 16, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.