summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Harvey2015-08-02 00:56:05 +0000
committerJames Harvey2015-08-02 00:56:05 +0000
commit8f4ab33cee410eeb6d34da30c41138e5eaaf9175 (patch)
tree4fb98161670552a1a33be24bbad9cd3cdbbe1443
parent5d5b970d13614d3cfbf1520972453e641f7c12ef (diff)
downloadaur-8f4ab33cee410eeb6d34da30c41138e5eaaf9175.tar.gz
Removed optional patch. Replaced with instructions on how to set in /etc/bash.bashrc or ~/.bashrc either upstream's default theme, or this maintainer's slightly modified default theme.
-rw-r--r--.SRCINFO6
-rw-r--r--Default_Arch.bgptheme16
-rw-r--r--PKGBUILD22
-rw-r--r--bash-git-prompt.install6
-rw-r--r--removed_spacing.patch30
5 files changed, 28 insertions, 52 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dfa2db6417c7..143fb4bd0a59 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,10 +11,10 @@ pkgbase = bash-git-prompt
optdepends = fish: git prompt in fish support
source = git+https://github.com/magicmonty/bash-git-prompt
source = bash-git-prompt.install
- source = removed_spacing.patch
+ source = Default_Arch.bgptheme
md5sums = SKIP
- md5sums = 1e762bd413b6efdec225928da5aa6451
- md5sums = 513706d4f97f775a60325bc31574d197
+ md5sums = db6f83999124b7fa660310a8d6624f70
+ md5sums = 8e4f18f5cfb65bdc5a94adb0477188ce
pkgname = bash-git-prompt
diff --git a/Default_Arch.bgptheme b/Default_Arch.bgptheme
new file mode 100644
index 000000000000..b39a1720fe5c
--- /dev/null
+++ b/Default_Arch.bgptheme
@@ -0,0 +1,16 @@
+# This is the default theme for gitprompt.sh
+# with removed spacing only necessary on other operating systems
+# and username and hostname displayed
+
+override_git_prompt_colors() {
+ GIT_PROMPT_THEME_NAME="Default Arch"
+ GIT_PROMPT_CONFLICTS="${Red}✖"
+ GIT_PROMPT_CHANGED="${Blue}✚"
+ GIT_PROMPT_STASHED="${BoldBlue}⚑"
+ GIT_PROMPT_SYMBOLS_AHEAD="↑"
+ GIT_PROMPT_SYMBOLS_BEHIND="↓"
+ GIT_PROMPT_END_USER=" \n${White}[\u@\h] ${Time12a}${ResetColor} $ "
+ GIT_PROMPT_END_USER=" \n${White}[\u@\h] ${Time12a}${ResetColor} # "
+}
+
+reload_git_prompt_colors "Default Arch"
diff --git a/PKGBUILD b/PKGBUILD
index 650677d7debf..e839a5f34306 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,6 @@
# 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
pkgver=2.3.5
pkgrel=1
@@ -22,22 +14,15 @@ makedepends=('git')
license=('custom:BSD 2 Clause (NetBSD)')
source=("git+https://github.com/magicmonty/${pkgname}"
'bash-git-prompt.install'
- 'removed_spacing.patch')
+ 'Default_Arch.bgptheme')
md5sums=('SKIP'
- '1e762bd413b6efdec225928da5aa6451'
- '513706d4f97f775a60325bc31574d197')
+ 'db6f83999124b7fa660310a8d6624f70'
+ '8e4f18f5cfb65bdc5a94adb0477188ce')
install='bash-git-prompt.install'
prepare() {
cd ${srcdir}/${pkgname}
git checkout tags/${pkgver}
-
- if [ -n "$_install_removed_spacing_patch" ]; then
- echo "Installing removed_spacing.patch..."
- patch -p1 -i ${srcdir}/removed_spacing.patch
- else
- echo "NOT installing removed_spacing.patch..."
- fi
}
package() {
@@ -54,6 +39,7 @@ package() {
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 ${srcdir}/Default_Arch.bgptheme ${pkgdir}/usr/lib/${pkgname}/themes/Default_Arch.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
diff --git a/bash-git-prompt.install b/bash-git-prompt.install
index 9596c0fe74cd..ef7e4ffecdf1 100644
--- a/bash-git-prompt.install
+++ b/bash-git-prompt.install
@@ -5,8 +5,12 @@ post_install() {
/etc/bash.bashrc or ~/.bashrc:
if [ -f %{/usr/lib/bash-git-prompt/gitprompt.sh ]; then
+ # To only show the git prompt in or under a repository directory
# GIT_PROMPT_ONLY_IN_REPO=1
- GIT_PROMPT_THEME=Default
+ # To use upstream's default theme
+ # GIT_PROMPT_THEME=Default
+ # To use upstream's default theme, modified by arch maintainer
+ GIT_PROMPT_THEME=Default_Arch
source /usr/lib/bash-git-prompt/gitprompt.sh
fi
diff --git a/removed_spacing.patch b/removed_spacing.patch
deleted file mode 100644
index 823dcdf941ac..000000000000
--- a/removed_spacing.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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
- }