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.
This commit is contained in:
Todd Zullinger 2012-08-15 20:26:42 -04:00
parent 2009a4551e
commit 172fa45d20

View File

@ -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@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