homebrew-core/Formula/bash-git-prompt.rb
Martin Gondermann 8e53709415 bash-git-prompt 2.3.4
Closes Homebrew/homebrew#35498.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-03 18:41:44 +00:00

25 lines
853 B
Ruby

require "formula"
class BashGitPrompt < Formula
homepage "https://github.com/magicmonty/bash-git-prompt"
url "https://github.com/magicmonty/bash-git-prompt/archive/2.3.4.tar.gz"
sha1 "300aa7a0e1b09d47e068bdc72c47045e5b20699d"
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
You should add the following to your .bashrc (or equivalent):
if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then
GIT_PROMPT_THEME=Default
source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh"
fi
EOS
end
end