Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:thomas-schraitle
bash-git-prompt
bash-git-prompt.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bash-git-prompt.spec of Package bash-git-prompt
# # spec file for package bash-git-prompt # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # # Useful if you want to integrate the prompt into your system. # %bcond_with intosysdir %global START_TOKEN ### Generated by %{name} rpm package %global END_TOKEN ### Generated by %{name} rpm package %define localbash %{_sysconfdir}/bash.bashrc.local Name: bash-git-prompt Version: 2.3.5 Release: 0 Summary: Informative Git Prompt for Bash License: BSD-2-Clause Group: Development/Tools/Other Url: https://github.com/magicmonty/bash-git-prompt.git Source0: https://github.com/magicmonty/bash-git-prompt/archive/%{name}-%{version}.tar.gz Source1: %{name}-rpmlintrc Requires: git Requires: bash BuildArch: noarch %description A bash prompt that displays information about the current Git repository. In particular the branch name, difference with remote branch, number of files staged, changed, etc. This package will automatically enable the Git prompt for bash after install. It will disable the prompt accordingly after uninstall. %prep %setup -q # Remove she-bang line SCRIPTS=*.sh for i in $SCRIPTS; do x=$(head -n1 $i) [[ ${x:0:3} == '#!/' ]] && sed -i 1d $i done %build # Nothing to do %install install -d 755 %{buildroot}%{_datadir}/%{name}/themes install -pm 644 *.sh %{buildroot}%{_datadir}/%{name} install -pm 644 themes/* %{buildroot}%{_datadir}/%{name}/themes %if %{with brown} %post # enable bash-git-prompt in local cat << EOF >> %{localbash} %{START_TOKEN} if [ -f %{_datadir}/%{name}/gitprompt.sh ]; then # Set config variables first GIT_PROMPT_ONLY_IN_REPO=1 source %{_datadir}/%{name}/gitprompt.sh fi %{END_TOKEN} EOF %postun # remove bash-git-prompt setup sed -i -e '/^%{START_TOKEN}/, /^%{END_TOKEN}/{d}' %{localbash} %endif %files %defattr(-,root,root,-) %doc README.md LICENSE.txt %{_datadir}/%{name} %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor