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