bash: bashrc: bail out in non-interactive shell

This commit is contained in:
lemmi 2015-07-01 18:41:35 +02:00
parent fe9118cd44
commit 0033d1ba75
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@
# Do not edit this file. # Do not edit this file.
# Place your readable configs in /etc/bash/bashrc.d/*.sh # Place your readable configs in /etc/bash/bashrc.d/*.sh
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
if [ -d /etc/bash/bashrc.d/ ]; then if [ -d /etc/bash/bashrc.d/ ]; then
for f in /etc/bash/bashrc.d/*.sh; do for f in /etc/bash/bashrc.d/*.sh; do
[ -r "$f" ] && . "$f" [ -r "$f" ] && . "$f"

View File

@ -3,7 +3,7 @@ pkgname=bash
_bash_distver=4.3 _bash_distver=4.3
_bash_patchlevel=039 _bash_patchlevel=039
version=${_bash_distver}.${_bash_patchlevel} version=${_bash_distver}.${_bash_patchlevel}
revision=4 revision=5
wrksrc=${pkgname}-${_bash_distver} wrksrc=${pkgname}-${_bash_distver}
build_pie=yes build_pie=yes
build_style=gnu-configure build_style=gnu-configure