scripts: on startup, also remove the buildtools dir 1.11
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 10 00:02:05 2011 +0200 (2011-07-10)
branch1.11
changeset 25561c0580ebdf9d
parent 2555 cb36b0091671
child 2557 b71761e8cff1
scripts: on startup, also remove the buildtools dir

In case there's one lingering around (whether the previous build was
successful, or failed), we have to remove the buildtools directory
as well as the toochain build dir.

This should also fix the case where out makeinfo wrapper calls
itself recursively.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 0e8ff57073838afea8830fe09d1d01cdf7cb37d8)
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Fri Apr 15 00:05:53 2011 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Sun Jul 10 00:02:05 2011 +0200
     1.3 @@ -208,9 +208,8 @@
     1.4  CT_DoLog EXTRA "Preparing working directories"
     1.5  
     1.6  # Ah! The build directory shall be eradicated, even if we restart!
     1.7 -if [ -d "${CT_BUILD_DIR}" ]; then
     1.8 -    CT_DoForceRmdir "${CT_BUILD_DIR}"
     1.9 -fi
    1.10 +# Ditto for the build tools install dir
    1.11 +CT_DoForceRmdir "${CT_BUILD_DIR}" "${CT_BUILDTOOLS_PREFIX_DIR}"
    1.12  
    1.13  # Don't eradicate directories if we need to restart
    1.14  if [ -z "${CT_RESTART}" ]; then