homebrew-core/Formula/bash-git-prompt.rb

26 lines
861 B
Ruby
Raw Normal View History

require "formula"
class BashGitPrompt < Formula
homepage "https://github.com/magicmonty/bash-git-prompt"
url "https://github.com/magicmonty/bash-git-prompt/archive/2.3.1.tar.gz"
sha1 "c973bd8b86ac332d7310d79f0009844340b5999f"
2014-09-15 09:30:39 +00:00
head "https://github.com/magicmonty/bash-git-prompt.git"
def install
share.install "gitprompt.sh", "gitprompt.fish", "git-prompt-help.sh",
"gitstatus.sh", "prompt-colors.sh"
(share/"themes").install Dir["themes/*.bgptheme"], "themes/Custom.bgptemplate"
doc.install "README.md"
end
def caveats; <<-EOS.undent
2014-09-15 09:30:39 +00:00
You should add the following to your .bashrc (or equivalent):
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
GIT_PROMPT_THEME=Default
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
fi
EOS
end
end