diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2019-03-20 10:35:34 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-26 06:59:06 +0100 |
commit | a5921f9abc0ff4353907b5c4f879eeff2d0a696f (patch) | |
tree | 805883e57891911aa86c444233e3ef9bc1c11857 /prefix-stack.bashrc | |
download | prefix-toolkit-a5921f9abc0ff4353907b5c4f879eeff2d0a696f.tar.gz prefix-toolkit-a5921f9abc0ff4353907b5c4f879eeff2d0a696f.tar.bz2 prefix-toolkit-a5921f9abc0ff4353907b5c4f879eeff2d0a696f.zip |
app-portage/prefix-toolkit: new packageprefix-toolkit-0
* For any Gentoo Prefix, provides the 'startprefix' script, and should
provide some 'runprefix' script later on, as inspired in
Bug: https://bugs.gentoo.org/673816
* For base Gentoo Prefix (as in "not stacked"), provides the
'prefix-stack-setup' script, superseding app-portage/prefix-chain-setup,
does force the prefix-stack implit USE flag in the stacked Prefix.
* For stacked Gentoo Prefix (set up using 'prefix-stack-setup'),
provides the toolchain wrapper, superseding sys-apps/prefix-chain-utils.
Bug: https://bugs.gentoo.org/658572
Closes: https://bugs.gentoo.org/509142
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Michael Haubenwallner <haubi@gentoo.org>
(cherry picked from commit 84b9f582e8c8db69a3b3677de702c7cc00ac3dab)
Diffstat (limited to 'prefix-stack.bashrc')
-rw-r--r-- | prefix-stack.bashrc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/prefix-stack.bashrc b/prefix-stack.bashrc new file mode 100644 index 0000000..7e9b951 --- /dev/null +++ b/prefix-stack.bashrc @@ -0,0 +1,24 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# In stacked Prefix there is no bash installed, yet +# etc/bash/bashrc from base Prefix still is useful. +# + +if [[ $- != *i* ]] ; then + # Shell is non-interactive, bashrc does not apply + return +fi + +if [[ -r @GENTOO_PORTAGE_BPREFIX@/etc/bash/bashrc ]] ; then + source '@GENTOO_PORTAGE_BPREFIX@/etc/bash/bashrc' + # only if base Prefix does have an etc/bash/bashrc, we also + # run bashrc snippets provided by packages in stacked Prefix + for sh in '@GENTOO_PORTAGE_EPREFIX@'/etc/bash/bashrc.d/* ; do + [[ -r ${sh} ]] && source "${sh}" + done + unset sh +else + # etc/profile does expect etc/bash/bashrc to set PS1 + PS1='\u@\h \w \$ ' +fi |