[git] Install git-prompt.sh in %{_sysconfdir}/profile.d

Todd Zullinger tmz at fedoraproject.org
Thu Aug 23 19:11:31 UTC 2012


commit 172fa45d2024d4a024489eee6749efa6ee725a3e
Author: Todd Zullinger <tmz at pobox.com>
Date:   Wed Aug 15 20:26:42 2012 -0400

    Install git-prompt.sh in %{_sysconfdir}/profile.d
    
    With git-1.7.12, __git_ps1 has moved to a separate script.  This is to
    accommodate newer bash-completion which allows for dynamic loading of
    completion files.
    
    Having git-prompt.sh in profile.d ensures that the functions needed for
    git in the prompt are present regardless of whether bash-completion is
    installed or loaded.

 git.spec |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/git.spec b/git.spec
index e183ac1..ab9f3e2 100644
--- a/git.spec
+++ b/git.spec
@@ -71,7 +71,7 @@
 
 Name:           git
 Version:        1.7.12
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Fast Version Control System
 License:        GPLv2
 Group:          Development/Tools
@@ -429,8 +429,11 @@ perl -p \
 %endif
     %{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git
 
+# Setup bash completion and git prompt
 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
 install -pm 644 contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git
+mkdir -p %{buildroot}%{_sysconfdir}/profile.d
+install -pm 644 contrib/completion/git-prompt.sh %{buildroot}%{_sysconfdir}/profile.d
 
 # Move contrib/hooks out of %%docdir and make them executable
 mkdir -p %{buildroot}%{_datadir}/git-core/contrib
@@ -471,6 +474,7 @@ rm -rf %{buildroot}
 %{!?_without_docs: %doc Documentation/*.html Documentation/docbook-xsl.css}
 %{!?_without_docs: %doc Documentation/howto Documentation/technical}
 %{_sysconfdir}/bash_completion.d
+%{_sysconfdir}/profile.d
 
 %files p4
 %defattr(-,root,root)
@@ -573,6 +577,9 @@ rm -rf %{buildroot}
 # No files for you!
 
 %changelog
+* Thu Aug 23 2012 Todd Zullinger <tmz at pobox.com> - 1.7.12-2
+- Install git-prompt.sh which provides __git_ps1()
+
 * Wed Aug 22 2012 Adam Tkac <atkac redhat com> - 1.7.12-1
 - update to 1.7.12
 


More information about the scm-commits mailing list