Gentoo Archives: gentoo-alt

From: Marshall McMullen <marshall.mcmullen@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Re: gcc: binary path
Date: Fri, 20 Apr 2007 21:26:19
Message-Id: ecea57780704201425o207b001fme18317ad0d8d85cd@mail.gmail.com
In Reply to: Re: [gentoo-alt] Re: gcc: binary path by Fabian Groffen
Yep, that one works better for me, thanks for that! Incidently, I just
added something like this to the top of my ~/.bashrc file:

#!/bin/bash

# What is our prefix?
EPREFIX="$HOME/.overlay"

if [ -z ${IN_EPREFIX} ]; then
    echo "Entering Gentoo Prefix ${EPREFIX}"

    # set the prefix shell in the environment
    SHELL=${SHELL##*/}
    export SHELL=${EPREFIX}/bin/${SHELL}
    export IN_EPREFIX=1
    $SHELL -l || echo "Failed to start the Prefix shell, this is
probably because you didn't emerge the shell $SHELL" > /dev/stderr
fi



On 4/20/07, Fabian Groffen <grobian@g.o> wrote:
> Ok, what about attached patch? > > On 20-04-2007 22:38:31 +0200, Fabian Groffen wrote: > > On 20-04-2007 15:21:45 -0500, Marshall McMullen wrote: > > > I know this is an old thread, but what I was trying to say is that > > > this script assumes that the shell used outside of prefix is in the > > > same path as the one inside prefix. Specifically, there is no > > > "/bin/bash" on our AIX 5.2, only /usr/bin/bash. Whereas in the > > > prefix, it's looking for $EPREFIX/bin/bash. This line fouls things > > > up: > > > > > > export SHELL=${EPREFIX}${SHELL} > > > > > > Since my shell is /usr/bin/bash It's going to look for > > > $EPREFIX/usr/bin/bash, which is not installed in $EPREFIX, it's at > > > $EPREFIX/bin/bash. > > > > Ok, you got a valid point there... > > -- > Fabian Groffen > Gentoo on a different level > >
-- Marshall McMullen marshall.mcmullen@×××××.com mjmcmullen@×××××.net mdmcmullen@××××××.com In France, there's a popular saying about Linux that essentially translates as: "Linux? You can get a less powerful system, but it will cost you more." -- gentoo-alt@g.o mailing list