Created
January 27, 2020 10:00
-
-
Save doekman/6449f5ca2dfdc17b81782ce004eefd68 to your computer and use it in GitHub Desktop.
Brew formula for ok-bash for when we are more notable.Create with `brew create --python https://github.com/secretGeek/ok-bash/archive/v0.8.1.tar.gz`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OkBash < Formula | |
desc ".ok folder profiles for bash" | |
homepage "https://github.com/secretGeek/ok-bash" | |
url "https://github.com/secretGeek/ok-bash/archive/v0.8.1.tar.gz" | |
sha256 "ec2d65dc617948d071012b7076f47fa0e23e2f47bf3b56ee07a7c5978dd07b50" | |
bottle :unneeded | |
def install | |
(prefix/"etc/profile.d").install "ok.sh" | |
(prefix/"etc/profile.d").install "ok-show.py" | |
end | |
def caveats; <<~EOS | |
For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc: | |
. #{etc}/profile.d/ok.sh | |
EOS | |
end | |
test do | |
(testpath/".ok").write("echo 1\necho 2\n") | |
testcmd = "/bin/bash -c '. #{etc}/profile.d/ok.sh; ok -q 2 2>/dev/null'" | |
assert_match "2", pipe_output(testcmd) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment