bash-git-prompt.rb 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. class BashGitPrompt < Formula
  2. desc "Informative, fancy bash prompt for Git users"
  3. homepage "https://github.com/magicmonty/bash-git-prompt"
  4. url "https://github.com/magicmonty/bash-git-prompt/archive/2.7.1.tar.gz"
  5. sha256 "5e5fc6f5133b65760fede8050d4c3bc8edb8e78bc7ce26c16db442aa94b8a709"
  6. head "https://github.com/magicmonty/bash-git-prompt.git"
  7. bottle :unneeded
  8. def install
  9. share.install "gitprompt.sh", "gitprompt.fish", "git-prompt-help.sh",
  10. "gitstatus.py", "gitstatus.sh", "gitstatus_pre-1.7.10.sh",
  11. "prompt-colors.sh"
  12. (share/"themes").install Dir["themes/*.bgptheme"], "themes/Custom.bgptemplate"
  13. doc.install "README.md"
  14. end
  15. def caveats; <<~EOS
  16. You should add the following to your .bashrc (or .bash_profile if bash is your login shell):
  17. if [ -f "#{HOMEBREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh" ]; then
  18. __GIT_PROMPT_DIR="#{HOMEBREW_PREFIX}/opt/bash-git-prompt/share"
  19. source "#{HOMEBREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh"
  20. fi
  21. EOS
  22. end
  23. test do
  24. system "true"
  25. end
  26. end