summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD67
-rw-r--r--bash-git-prompt.install30
-rw-r--r--removed_spacing.patch30
4 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..40985d1fa280
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = bash-git-prompt-git
+ pkgdesc = Informative git prompt for bash and fish (git version)
+ pkgver = 2.3.5.r249.2a6b20c
+ pkgrel = 1
+ url = https://github.com/magicmonty/bash-git-prompt
+ install = bash-git-prompt.install
+ arch = any
+ license = custom:BSD 2 Clause (NetBSD)
+ makedepends = git
+ depends = bash
+ optdepends = fish: git prompt in fish support
+ provides = bash-git-prompt
+ conflicts = bash-git-prompt
+ source = git+https://github.com/magicmonty/bash-git-prompt
+ source = bash-git-prompt.install
+ source = removed_spacing.patch
+ md5sums = SKIP
+ md5sums = 1e762bd413b6efdec225928da5aa6451
+ md5sums = 513706d4f97f775a60325bc31574d197
+
+pkgname = bash-git-prompt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..427d551bb54d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id$
+# Maintainer: James Harvey <jamespharvey20@gmail.com>
+# * No namcap warnings or errors
+
+
+
+# Upstream has extra spacing in the default theme, necessary in other distributions
+# If you want to remove these, since they aren't needed on arch, uncomment (remove the # on) the line below
+_install_removed_spacing_patch=1
+
+
+
+pkgname=bash-git-prompt-git
+_pkgname=bash-git-prompt
+pkgver=2.3.5.r249.2a6b20c
+pkgrel=1
+pkgdesc="Informative git prompt for bash and fish (git version)"
+arch=('any')
+url="https://github.com/magicmonty/bash-git-prompt"
+depends=('bash')
+optdepends=('fish: git prompt in fish support')
+makedepends=('git')
+provides=('bash-git-prompt')
+conflicts=('bash-git-prompt')
+license=('custom:BSD 2 Clause (NetBSD)')
+source=("git+https://github.com/magicmonty/${_pkgname}"
+ 'bash-git-prompt.install'
+ 'removed_spacing.patch')
+md5sums=('SKIP'
+ '1e762bd413b6efdec225928da5aa6451'
+ '513706d4f97f775a60325bc31574d197')
+install='bash-git-prompt.install'
+
+pkgrel() {
+ echo $(cat bash-git-prompt.rb | grep url | sed 's|.*archive/||' | sed 's|.tar.gz"$||').r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+ if [ -n "$_install_removed_spacing_patch" ]; then
+ cd ${srcdir}/${_pkgname}
+ echo "Installing removed_spacing.patch..."
+ patch -p1 -i ${srcdir}/removed_spacing.patch
+ else
+ echo "NOT installing removed_spacing.patch..."
+ fi
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}
+
+ install -Dm644 gitprompt.fish ${pkgdir}/usr/lib/bash-git-prompt/gitprompt.fish
+ install -Dm755 git-prompt-help.sh ${pkgdir}/usr/lib/bash-git-prompt/git-prompt-help.sh
+ install -Dm755 gitprompt.sh ${pkgdir}/usr/lib/bash-git-prompt/gitprompt.sh
+ install -Dm755 gitstatus.sh ${pkgdir}/usr/lib/bash-git-prompt/gitstatus.sh
+ install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
+ install -Dm644 prompt-colors.sh ${pkgdir}/usr/lib/bash-git-prompt/prompt-colors.sh
+ install -Dm644 README.md ${pkgdir}/usr/lib/bash-git-prompt/README.md
+
+ cd themes
+ install -Dm644 Custom.bgptemplate ${pkgdir}/usr/lib/${_pkgname}/themes/Custom.bgptemplate
+ install -Dm644 Default.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Default.bgptheme
+ install -Dm644 Default_NoExitState.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Default_NoExitState.bgptheme
+ install -Dm644 Single_line.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Single_line.bgptheme
+ install -Dm644 Single_line_openSUSE.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Single_line_openSUSE.bgptheme
+ install -Dm644 Solarized.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Solarized.bgptheme
+ install -Dm644 Solarized_NoExitState.bgptheme ${pkgdir}/usr/lib/${_pkgname}/themes/Solarized_NoExitState.bgptheme
+}
diff --git a/bash-git-prompt.install b/bash-git-prompt.install
new file mode 100644
index 000000000000..9596c0fe74cd
--- /dev/null
+++ b/bash-git-prompt.install
@@ -0,0 +1,30 @@
+post_install() {
+ echo "bash-git-prompt
+
+ NOTE: To use bash-git-prompt, you should add the following to your
+ /etc/bash.bashrc or ~/.bashrc:
+
+ if [ -f %{/usr/lib/bash-git-prompt/gitprompt.sh ]; then
+ # GIT_PROMPT_ONLY_IN_REPO=1
+ GIT_PROMPT_THEME=Default
+ source /usr/lib/bash-git-prompt/gitprompt.sh
+ fi
+
+"
+}
+
+post_remove() {
+ echo "bash-git-prompt
+
+ NOTE: Any already running shells that were using bash-git-prompt will give a
+ bunch of errors with every new prompt line, until you start new shells
+ by doing one of the following:
+
+ * Restarting your shells (relogging in each of them)
+ * Starting new shells (running "bash" in each of them)
+ * Rebooting
+
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+"
+}
diff --git a/removed_spacing.patch b/removed_spacing.patch
new file mode 100644
index 000000000000..823dcdf941ac
--- /dev/null
+++ b/removed_spacing.patch
@@ -0,0 +1,30 @@
+diff -rupN bash-git-prompt/themes/Default.bgptheme bash-git-prompt-removed-spacing/themes/Default.bgptheme
+--- bash-git-prompt/themes/Default.bgptheme 2015-08-01 23:31:22.105038716 +0000
++++ bash-git-prompt-removed-spacing/themes/Default.bgptheme 2015-08-01 23:43:18.399408812 +0000
+@@ -43,12 +43,12 @@ define_undefined_git_prompt_colors() {
+
+ if [[ -z ${GIT_PROMPT_BRANCH} ]]; then GIT_PROMPT_BRANCH="${Magenta}"; fi # the git branch that is active in the current directory
+ if [[ -z ${GIT_PROMPT_STAGED} ]]; then GIT_PROMPT_STAGED="${Red}●"; fi # the number of staged files/directories
+- if [[ -z ${GIT_PROMPT_CONFLICTS} ]]; then GIT_PROMPT_CONFLICTS="${Red}✖ "; fi # the number of files in conflict
+- if [[ -z ${GIT_PROMPT_CHANGED} ]]; then GIT_PROMPT_CHANGED="${Blue}✚ "; fi # the number of changed files
++ if [[ -z ${GIT_PROMPT_CONFLICTS} ]]; then GIT_PROMPT_CONFLICTS="${Red}✖"; fi # the number of files in conflict
++ if [[ -z ${GIT_PROMPT_CHANGED} ]]; then GIT_PROMPT_CHANGED="${Blue}✚"; fi # the number of changed files
+
+ if [[ -z ${GIT_PROMPT_REMOTE} ]]; then GIT_PROMPT_REMOTE=" "; fi # the remote branch name (if any) and the symbols for ahead and behind
+ if [[ -z ${GIT_PROMPT_UNTRACKED} ]]; then GIT_PROMPT_UNTRACKED="${Cyan}…"; fi # the number of untracked files/dirs
+- if [[ -z ${GIT_PROMPT_STASHED} ]]; then GIT_PROMPT_STASHED="${BoldBlue}⚑ "; fi # the number of stashed files/dir
++ if [[ -z ${GIT_PROMPT_STASHED} ]]; then GIT_PROMPT_STASHED="${BoldBlue}⚑"; fi # the number of stashed files/dir
+ if [[ -z ${GIT_PROMPT_CLEAN} ]]; then GIT_PROMPT_CLEAN="${BoldGreen}✔"; fi # a colored flag indicating a "clean" repo
+
+ # For the command indicator, the placeholder _LAST_COMMAND_STATE_
+@@ -72,8 +72,8 @@ define_undefined_git_prompt_colors() {
+ if [[ -z ${GIT_PROMPT_END_ROOT} ]]; then GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "; fi
+
+ # Please do not add colors to these symbols
+- if [[ -z ${GIT_PROMPT_SYMBOLS_AHEAD} ]]; then GIT_PROMPT_SYMBOLS_AHEAD="↑·"; fi # The symbol for "n versions ahead of origin"
+- if [[ -z ${GIT_PROMPT_SYMBOLS_BEHIND} ]]; then GIT_PROMPT_SYMBOLS_BEHIND="↓·"; fi # The symbol for "n versions behind of origin"
++ if [[ -z ${GIT_PROMPT_SYMBOLS_AHEAD} ]]; then GIT_PROMPT_SYMBOLS_AHEAD="↑"; fi # The symbol for "n versions ahead of origin"
++ if [[ -z ${GIT_PROMPT_SYMBOLS_BEHIND} ]]; then GIT_PROMPT_SYMBOLS_BEHIND="↓"; fi # The symbol for "n versions behind of origin"
+ if [[ -z ${GIT_PROMPT_SYMBOLS_PREHASH} ]]; then GIT_PROMPT_SYMBOLS_PREHASH=":"; fi # Written before hash of commit, if no name could be found
+ if [[ -z ${GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING} ]]; then GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="L"; fi # This symbol is written after the branch, if the branch is not tracked
+ }