[arch-commits] Commit in bash/trunk (PKGBUILD system.bashrc)

Thomas Bächler thomas at archlinux.org
Wed Aug 26 08:23:33 UTC 2009


    Date: Wednesday, August 26, 2009 @ 04:23:33
  Author: thomas
Revision: 50415

Add global bashrc file

Added:
  bash/trunk/system.bashrc
Modified:
  bash/trunk/PKGBUILD

---------------+
 PKGBUILD      |    9 +++++++--
 system.bashrc |   31 +++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-08-26 08:05:26 UTC (rev 50414)
+++ PKGBUILD	2009-08-26 08:23:33 UTC (rev 50415)
@@ -16,7 +16,10 @@
 provides=('sh')
 install=bash.install
 source=(http://ftp.gnu.org/gnu/bash/bash-4.0.tar.gz
-        profile.bash bashrc enable-system-config-files.patch)
+        profile.bash
+        bashrc
+        enable-system-config-files.patch
+        system.bashrc)
 if [ $_patchlevel -gt 000 ]; then
     for p in $(seq -w 001 $_patchlevel); do
         source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-4.0-patches/bash40-$p)
@@ -39,7 +42,8 @@
   make || return 1
   make DESTDIR=${startdir}/pkg install
 
-  install -D -m644 ${startdir}/src/profile.bash ${startdir}/pkg/etc/profile.bash
+  install -D -m644 ${startdir}/src/profile.bash ${startdir}/pkg/etc/profile.bash || return 1
+  install -D -m644 ${startdir}/src/system.bashrc ${startdir}/pkg/etc/bash.bashrc || return 1
 
   # for now, bash is our default /bin/sh
   cd ${startdir}/pkg/bin
@@ -58,6 +62,7 @@
          'c2fae355facefcac8a732cce877da194'
          '3d2837e84645eac9bde399b58014bafa'
          '51725defa4c2dec49c1bc15883e0bee2'
+         '196697769f1667a8a1aed608811129c6'
          'bc7f4762443939bd7dccb42370f0d932'
          'c2a4a4786a83ed4ec366c6a8924369a2'
          '22e8a824eddba21a8fce10d7984c2aba'

Added: system.bashrc
===================================================================
--- system.bashrc	                        (rev 0)
+++ system.bashrc	2009-08-26 08:23:33 UTC (rev 50415)
@@ -0,0 +1,31 @@
+#
+# /etc/bash.bashrc
+#
+# This file is the systemwide bashrc file. While most of the
+# environment is preserved when running an interactive shell
+# the PS[1-4] variables, aliases and functions are reset.
+#
+# When running a non-login shell, apply the following settings:
+# - Prompt defaults (PS[1-4], PROMPT_COMMAND)
+# - bash_completion if it exists
+# - source /etc/bash.bashrc.local
+
+PS1='[\u@\h \W]\$ '
+PS2='> '
+PS3='> '
+PS4='+ '
+
+export PS1 PS2 PS3 PS4
+
+if test "$TERM" = "xterm" -o \
+        "$TERM" = "xterm-color" -o \
+        "$TERM" = "xterm-256color" -o \
+        "$TERM" = "rxvt" -o \
+        "$TERM" = "rxvt-unicode" -o \
+        "$TERM" = "xterm-xfree86"; then
+    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
+    export PROMPT_COMMAND
+fi
+
+[ -r /etc/bash_completion   ] && . /etc/bash_completion
+[ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local




More information about the arch-commits mailing list