Mercurial > hg > aboriginal
changeset 1510:8e98296410f3
Another attempt to make more/record-commands.sh and host-tools.sh play together.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 21 Mar 2012 17:47:20 -0500 |
parents | c8fac8498b66 |
children | e59de35d8437 |
files | host-tools.sh sources/include.sh |
diffstat | 2 files changed, 21 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/host-tools.sh Wed Mar 21 17:45:39 2012 -0500 +++ b/host-tools.sh Wed Mar 21 17:47:20 2012 -0500 @@ -104,8 +104,11 @@ FALLBACK="$STAGE_DIR" PATH="$OLDPATH" "$STAGE_DIR/which" -a "$i" | while read j do - mkdir -p "$FALLBACK" && - ln -sf "$j" "$FALLBACK/$i" || dienow + if [ ! -e "$FALLBACK/$i" ] + then + mkdir -p "$FALLBACK" && + ln -sf "$j" "$FALLBACK/$i" || dienow + fi X=$[$X+1] FALLBACK="$STAGE_DIR/fallback-$X" @@ -123,7 +126,7 @@ # gcc.real. Systems that aren't crazy don't need this. ET_TU_UBUNTU="$(PATH="$OLDPATH" "$STAGE_DIR/which" gcc.real)" -[ ! -z "$ET_TU_UBUNTU" ] && ln -sf "$ET_TU_UBUNTU" "$STAGE_DIR/gcc.real" +[ ! -z "$ET_TU_UBUNTU" ] && ln -s "$ET_TU_UBUNTU" "$STAGE_DIR/gcc.real" 2>/dev/null # We now have all the tools we need in $STAGE_DIR, so trim the $PATH to # remove the old ones.
--- a/sources/include.sh Wed Mar 21 17:45:39 2012 -0500 +++ b/sources/include.sh Wed Mar 21 17:47:20 2012 -0500 @@ -67,18 +67,23 @@ # Adjust $PATH # If record-commands.sh set up a wrapper directory, adjust $PATH again. -if [ -z "$OLDPATH" ] && [ -f "$WRAPDIR/wrappy" ] + +export PATH +if [ -z "$OLDPATH" ] then - mkdir -p "$BUILD/logs" - [ $? -ne 0 ] && echo "Bad $WRAPDIR" >&2 && dienow - export WRAPPY_LOGPATH="$BUILD/logs/cmdlines.$ARCH_NAME.early" export OLDPATH="$PATH" - PATH="$WRAPDIR" -else - export OLDPATH="$PATH" - [ ! -f "$HOSTTOOLS/busybox" ] && - PATH="$(hosttools_path):$OLDPATH" || - PATH="$(hosttools_path)" + [ -f "$HOSTTOOLS/busybox" ] && + PATH="$(hosttools_path)" || + PATH="$(hosttools_path):$PATH" + + if [ -f "$WRAPDIR/wrappy" ] + then + OLDPATH="$PATH" + mkdir -p "$BUILD/logs" + [ $? -ne 0 ] && echo "Bad $WRAPDIR" >&2 && dienow + export WRAPPY_LOGPATH="$BUILD/logs/cmdlines.$ARCH_NAME.early" + PATH="$WRAPDIR" + fi fi # Create files with known permissions