Mercurial > hg > aboriginal
changeset 615:7523d1f3b818
Some slight paranoia against multiple host-tools.sh runs that get interrupted in the middle. (Yeah, in general that's not guaranteed to work, but still...)
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 10 Feb 2009 21:14:09 -0600 |
parents | d771a938c673 |
children | a95cb8f13284 |
files | host-tools.sh sources/include.sh |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/host-tools.sh Mon Feb 09 15:08:59 2009 -0600 +++ b/host-tools.sh Tue Feb 10 21:14:09 2009 -0600 @@ -76,7 +76,9 @@ for i in ar as nm cc gcc make ld do - [ ! -f "${HOSTTOOLS}/$i" ] && (ln -s `which $i` "${HOSTTOOLS}/$i" || dienow) + [ ! -f "${HOSTTOOLS}/$i" ] && + (ln -s `PATH="$OLDPATH" which $i` "${HOSTTOOLS}/$i" || dienow) + done # Build toybox
--- a/sources/include.sh Mon Feb 09 15:08:59 2009 -0600 +++ b/sources/include.sh Tue Feb 10 21:14:09 2009 -0600 @@ -31,6 +31,10 @@ mkdir -p "${SRCDIR}" || dienow +# Retain old $PATH in case we re-run host-tools.sh with different options. + +export OLDPATH="$PATH" + # Adjust $PATH if [ "$PATH" != "$HOSTTOOLS" ]