summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvp <mvp@users.noreply.github.com>2017-07-27 11:13:45 -0700
committerGitHub <noreply@github.com>2017-07-27 11:13:45 -0700
commitf85b7937ab48906335f2f2432e37a72a190f0b21 (patch)
tree56e937252284cf0d409c4171ec2e34f8156f8213
parent93173f612a231d808f19f27428d8c87c05975ba4 (diff)
parent4ffafa0e537b1cab8107475623bc7d429be84947 (diff)
Merge pull request #44 from apla/mac-homebrew
Mac homebrew installation
-rw-r--r--Formula/uhubctl.rb16
-rw-r--r--README.md7
2 files changed, 23 insertions, 0 deletions
diff --git a/Formula/uhubctl.rb b/Formula/uhubctl.rb
new file mode 100644
index 0000000..440b1cd
--- /dev/null
+++ b/Formula/uhubctl.rb
@@ -0,0 +1,16 @@
+class Uhubctl < Formula
+ desc "control USB hubs powering per-port"
+ homepage "https://github.com/mvp/uhubctl"
+ head "https://github.com/mvp/uhubctl.git"
+
+ depends_on "libusb"
+
+ def install
+ system "make"
+ bin.install "uhubctl"
+ end
+
+ test do
+ system "#{bin}/uhubctl", "-v"
+ end
+end
diff --git a/README.md b/README.md
index 5a27a0a..a9ab3bc 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,13 @@ First, you need to install library libusb-1.0 (version 1.0.12 or later):
To compile, simply run `make` - this will generate `uhubctl` binary.
+Alternatively, for macOS you can build an executable with homebrew's custom tap:
+
+```
+brew tap mvp/uhubctl https://github.com/mvp/uhubctl/
+brew install --HEAD uhubctl
+```
+
Usage
=====