From 9e42093ec8012b12b28b3e9fa8e3ec340391eca6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 4 Jan 2007 23:44:41 +0000 Subject: [PATCH] Add more support for BSD systems. Package-Manager: portage-2.1.2_rc4-r5 --- app-shells/bash/ChangeLog | 5 ++++- app-shells/bash/Manifest | 26 ++++++++++++++++------- app-shells/bash/files/bashrc | 41 ++++++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog index f8546ea9d58c..512d90911732 100644 --- a/app-shells/bash/ChangeLog +++ b/app-shells/bash/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-shells/bash # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.129 2007/01/01 19:23:15 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.130 2007/01/04 23:44:41 vapier Exp $ + + 04 Jan 2007; Mike Frysinger files/bashrc: + Add more support for BSD systems. 01 Jan 2007; Roy Marples files/bash-3.2-dev-fd-test-as-user.patch: diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest index 21716b056b63..34256583ab7b 100644 --- a/app-shells/bash/Manifest +++ b/app-shells/bash/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX bash-2.05b-empty-herestring.patch 836 RMD160 bdeef415bb8ef5294bfdb47a00beb3523f5e33c5 SHA1 fc34260611e395caee16930e66ec13e7aae63796 SHA256 a05098a9bb85520efc5c6d108fdcf635e4a9b20369d42d9aa0803c6b1d145cae MD5 edf95b873162f4548435c379e4998b4e files/bash-2.05b-empty-herestring.patch 836 RMD160 bdeef415bb8ef5294bfdb47a00beb3523f5e33c5 files/bash-2.05b-empty-herestring.patch 836 @@ -190,10 +193,10 @@ AUX bash_logout 205 RMD160 fa6064b67bd02cf66dc490759442a0127770d420 SHA1 a698366 MD5 229ccc2980a94877f2e87f957e9da7bf files/bash_logout 205 RMD160 fa6064b67bd02cf66dc490759442a0127770d420 files/bash_logout 205 SHA256 15aaded954389c05d7de5d36c4887db61975ad52c87ad78baf1062ec8997289d files/bash_logout 205 -AUX bashrc 2484 RMD160 373d402f43bc46a473dde075a855f5cd10ad1f4e SHA1 88277fd12149838c06cd529c3401ad781c149ec8 SHA256 c92a176a66f14966b4d455c2b742957f588b6d99639c39b2924e977f3b7ed333 -MD5 c719a4674586c0d017afc2b9a8186d20 files/bashrc 2484 -RMD160 373d402f43bc46a473dde075a855f5cd10ad1f4e files/bashrc 2484 -SHA256 c92a176a66f14966b4d455c2b742957f588b6d99639c39b2924e977f3b7ed333 files/bashrc 2484 +AUX bashrc 2816 RMD160 3053777e98d6112ef53b778b4f5081c5557cea3c SHA1 f897e1217f8ae2d390a3f1b5992ddb2c6c0c40fc SHA256 d22be703751b24439aba96f06fe0e43c5111c3fa784c789fdb60263c33c4329f +MD5 eaf23a25b530eb4d0f291c95dae848e0 files/bashrc 2816 +RMD160 3053777e98d6112ef53b778b4f5081c5557cea3c files/bashrc 2816 +SHA256 d22be703751b24439aba96f06fe0e43c5111c3fa784c789fdb60263c33c4329f files/bashrc 2816 AUX dot-bash_logout 127 RMD160 6092e24ba79924d0dd566657f97972237f8f5b68 SHA1 9e1e6e03b033fdfcf9f2098324bac5754c26ec69 SHA256 3bcb4958dad662fc2cbe77177236679f7a09b8bdb0be738102df4457394f4022 MD5 7d8a8ef90c1818a0cd66808ac2740638 files/dot-bash_logout 127 RMD160 6092e24ba79924d0dd566657f97972237f8f5b68 files/dot-bash_logout 127 @@ -297,10 +300,10 @@ EBUILD bash-3.2_p9.ebuild 4349 RMD160 6ae9a6429ac83712e557346bc03e9058b326183d S MD5 6a5b3c847e3c85dcd5599d35bb53ea33 bash-3.2_p9.ebuild 4349 RMD160 6ae9a6429ac83712e557346bc03e9058b326183d bash-3.2_p9.ebuild 4349 SHA256 2f929739750214c01b34c4d936cdff7427db23e496e820a1de696233ba7489b3 bash-3.2_p9.ebuild 4349 -MISC ChangeLog 23004 RMD160 da89160b3c0aeaef58e7e30734a849b3d67c3eae SHA1 7241217eb2363137b901d468b7b58286f7164670 SHA256 477622a0bb9c1c7e5bcf082cb0d2ccb90a0401167c18b8e55b0659558f61e0e9 -MD5 11eee00d13b63fe1c34837efb90d31d2 ChangeLog 23004 -RMD160 da89160b3c0aeaef58e7e30734a849b3d67c3eae ChangeLog 23004 -SHA256 477622a0bb9c1c7e5bcf082cb0d2ccb90a0401167c18b8e55b0659558f61e0e9 ChangeLog 23004 +MISC ChangeLog 23103 RMD160 ca4d58aa794da390e1758f0b5b334b6563633b43 SHA1 5ac35482160098b6d2d66cedd3e3268655102b5a SHA256 ec69c9ffd259bcf3dce83a0ef475a75c532a8d74e7e789922cc9bc6a66019d06 +MD5 78a2fae9dede8b0431c4671d13da50b4 ChangeLog 23103 +RMD160 ca4d58aa794da390e1758f0b5b334b6563633b43 ChangeLog 23103 +SHA256 ec69c9ffd259bcf3dce83a0ef475a75c532a8d74e7e789922cc9bc6a66019d06 ChangeLog 23103 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164 @@ -332,3 +335,10 @@ SHA256 1fe387fc344fd77f445608d6e5d99d8547c8c2f0aba4150c6b54720ff7a0b7df files/di MD5 ef1b3c02b997284cb562ba9e3eebf17c files/digest-bash-3.2_p9-r1 2074 RMD160 3232387aa160a9ea2ee764e929fa58618674d590 files/digest-bash-3.2_p9-r1 2074 SHA256 1fe387fc344fd77f445608d6e5d99d8547c8c2f0aba4150c6b54720ff7a0b7df files/digest-bash-3.2_p9-r1 2074 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.1 (GNU/Linux) + +iD8DBQFFnZHB8bi6rjpTunYRAgIdAJ48JgiGpmKqTzg6m0PZ3g2TWGoLGgCgnteS +3VRbANXJbR7EhKARe6VztY0= +=YiEY +-----END PGP SIGNATURE----- diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc index b6fee4df9e22..be1bec629c88 100644 --- a/app-shells/bash/files/bashrc +++ b/app-shells/bash/files/bashrc @@ -23,6 +23,21 @@ shopt -s checkwinsize # Enable history appending instead of overwriting. #139609 shopt -s histappend +# Change the window title of X terminals +case ${TERM} in + xterm*|rxvt*|Eterm|aterm|kterm|gnome) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' + ;; + screen) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' + ;; +esac +#BSD#@# BSD doesn't typically come with dircolors so we need +#BSD#@# to be lame and hardcode some terminals in here. +#BSD#@case ${TERM} in +#BSD#@ xterm*|rxvt*|Eterm|aterm|kterm|gnome|screen|cons25) use_color=true;; +#BSD#@esac + # Set colorful PS1 only on colorful terminals. # dircolors --print-database uses its own built-in database # instead of using /etc/DIR_COLORS. Try to use the external file @@ -33,16 +48,20 @@ safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM match_lhs="" [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null #BSD#@ \ + && match_lhs=$(dircolors --print-database) [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true if ${use_color} ; then # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 - if [[ -f ~/.dir_colors ]] ; then - eval $(dircolors -b ~/.dir_colors) - elif [[ -f /etc/DIR_COLORS ]] ; then - eval $(dircolors -b /etc/DIR_COLORS) - fi + if type -p dircolors >/dev/null ; then#BSD#@ + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi#BSD#@ if [[ ${EUID} == 0 ]] ; then PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' @@ -64,13 +83,3 @@ fi # Try to keep environment pollution down, EPA loves us. unset use_color safe_term match_lhs - -# Change the window title of X terminals -case ${TERM} in - xterm*|rxvt*|Eterm|aterm|kterm|gnome) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' - ;; - screen) - PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"' - ;; -esac -- 2.26.2