scripts: on startup, also remove the buildtools dir
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 10 00:02:05 2011 +0200 (2011-07-10)
changeset 25430e8ff5707383
parent 2542 5efe494cf718
child 2544 751c3f735ada
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>
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Sat Jul 09 19:40:24 2011 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Sun Jul 10 00:02:05 2011 +0200
     1.3 @@ -213,9 +213,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