Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Lsusb utility for Mac OS X #23803

Closed
wants to merge 3 commits into from

3 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
@jlhonora jlhonora 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.
245cdb9
@jlhonora jlhonora Added man page
Added documentation for the lsusb command
8a4a4df
@adamv
Owner
Error Message

failed: brew audit lsusb
Error: 1 problems in 1 formulae
lsusb:
 * Trailing whitespace was found
Library/Formula/lsusb.rb
@@ -0,0 +1,21 @@
+require 'formula'
+
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/homebrew'
+ url 'https://raw.github.com/jlhonora/lsusb/fdf36d393881d0ba479988a8e890afdb6544753b/lsusb'
@adamv Owner
adamv added a note

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/lsusb.rb
@@ -0,0 +1,21 @@
+require 'formula'
+
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/homebrew'
+ url 'https://raw.github.com/jlhonora/lsusb/fdf36d393881d0ba479988a8e890afdb6544753b/lsusb'
+ sha1 '7603057721c16af33eb48e4b631d4a595b13dba0'
+ version '0.1'
+ head 'https://github.com/jlhonora/lsusb.git'
+
+ depends_on 'wget'
+
+ def install
+ system "wget https://raw.github.com/jlhonora/lsusb/master/man/lsusb.1"
@adamv Owner
adamv added a note

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/lsusb.rb
@@ -0,0 +1,21 @@
+require 'formula'
+
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/homebrew'
+ url 'https://raw.github.com/jlhonora/lsusb/fdf36d393881d0ba479988a8e890afdb6544753b/lsusb'
+ sha1 '7603057721c16af33eb48e4b631d4a595b13dba0'
+ version '0.1'
+ head 'https://github.com/jlhonora/lsusb.git'
+
+ depends_on 'wget'
+
+ def install
+ system "wget https://raw.github.com/jlhonora/lsusb/master/man/lsusb.1"
+ bin.install('lsusb')
@adamv Owner
adamv added a note

Drop parens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/lsusb.rb
((3 lines not shown))
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/homebrew'
+ url 'https://raw.github.com/jlhonora/lsusb/fdf36d393881d0ba479988a8e890afdb6544753b/lsusb'
+ sha1 '7603057721c16af33eb48e4b631d4a595b13dba0'
+ version '0.1'
+ head 'https://github.com/jlhonora/lsusb.git'
+
+ depends_on 'wget'
+
+ def install
+ system "wget https://raw.github.com/jlhonora/lsusb/master/man/lsusb.1"
+ bin.install('lsusb')
+ man1.install('lsusb.1')
+ end
+
+ test do
@adamv Owner
adamv added a note

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jlhonora jlhonora 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
3215a5d
@jlhonora

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

@adamv
Owner

@mikemcquaid notability check please

@mikemcquaid
Owner

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
@jlhonora jlhonora referenced this pull request
Closed

New formula: lsusb #24161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2013
  1. @jlhonora

    Added a lsusb utility script

    jlhonora authored
    `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.
  2. @jlhonora

    Added man page

    jlhonora authored
    Added documentation for the lsusb command
  3. @jlhonora

    Corrected multiple homebrew errors

    jlhonora authored
    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
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +15 −0 Library/Formula/lsusb.rb
View
15 Library/Formula/lsusb.rb
@@ -0,0 +1,15 @@
+require 'formula'
+
+class Lsusb < Formula
+ homepage 'https://github.com/jlhonora/lsusb'
+ url 'https://raw.github.com/jlhonora/lsusb/master/lsusb-0.1.tar.gz'
+ sha1 '46556b26ed9b6086cf724bdb4e573ff4de16517c'
+
+ head 'https://github.com/jlhonora/lsusb.git'
+
+ def install
+ bin.install 'lsusb'
+ man1.install 'man/lsusb.1'
+ end
+
+end
Something went wrong with that request. Please try again.