aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-01-31 22:46:04 +0100
committerTeddy Wing2018-01-31 22:46:04 +0100
commitb25764a4bfc9cdc79db7baa707c58ee32c510347 (patch)
tree5805014f379e04ca06789f102601a76c47c0702e
parent90209cf90fc41cd0962a14f32c8d42bf3ceb6cd0 (diff)
downloadharvester-b25764a4bfc9cdc79db7baa707c58ee32c510347.tar.bz2
Add Homebrew formula
Add a formula to enable easy installation through Homebrew. Include some installation documentation in the README.
-rw-r--r--Homebrew/harvester.rb22
-rw-r--r--README.md10
2 files changed, 32 insertions, 0 deletions
diff --git a/Homebrew/harvester.rb b/Homebrew/harvester.rb
new file mode 100644
index 0000000..70d3616
--- /dev/null
+++ b/Homebrew/harvester.rb
@@ -0,0 +1,22 @@
+class Harvester < Formula
+ desc "A program that wraps 'hcl' to interact with Harvest with a Timetasker-like interface"
+ homepage "https://github.com/teddywing/harvester"
+ url "https://github.com/teddywing/harvester/archive/v0.0.1.tar.gz"
+ sha256 "ea136e11c80beb96c7e272c38d0376f5b8f1a23e09e4bd6297e12795ba858c3b"
+
+ def install
+ bin.install "harvester"
+ bash_completion.install "harvester.bash-completion" => "harvester"
+ end
+
+ def caveats; <<~EOS
+ To enable tab completion, add the following to your bash profile:
+
+ source #{etc}/bash_completion.d/harvester
+ EOS
+ end
+
+ test do
+ shell_output("bash -c 'harvester --help'")
+ end
+end
diff --git a/README.md b/README.md
index fdd1e3c..5778bcd 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,16 @@ default to the current day.
* In order to use the `--date` option, [this patch to hcl is required][3].
+## Install
+Mac OS X users can install Harvester with Homebrew:
+
+ $ brew install https://raw.githubusercontent.com/teddywing/harvester/master/Homebrew/harvester.rb
+
+On other platforms, grab the code and put the `harvester` script in your `PATH`.
+Bash completion for project aliases can be added by sourcing the
+`harvester.bash-completion` file in your Bash profile.
+
+
## License
Copyright © 2018 Teddy Wing. Licensed under the GNU GPLv3+ (see the included
COPYING file).