From: Michael Tremer Date: Tue, 8 Dec 2009 10:33:26 +0000 (+0100) Subject: naoki: If ${TOOLS_DIR} points to right directory. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e152ae41ba9fc29c5ebd2024208e272997faf216;p=ipfire-3.x.git naoki: If ${TOOLS_DIR} points to right directory. --- diff --git a/tools/naoki-functions b/tools/naoki-functions index fbcc2c2cf..fa9705efc 100644 --- a/tools/naoki-functions +++ b/tools/naoki-functions @@ -69,7 +69,11 @@ function naoki_prepare() { mkdir -p ${BUILD_DIR}/usr/src if [ "${TOOLCHAIN}" = "1" ]; then - # Creating /tools_xxx + ## Creating /tools_xxx + # if dir points to wrong direction, we will remove it. + if [ "$(readlink ${TOOLS_DIR})" != "${TOOLS_DIR_REAL}" ]; then + rm -f ${TOOLS_DIR} + fi mkdir ${TOOLS_DIR_REAL} 2>/dev/null if [ ! -h "${TOOLS_DIR}" ]; then ln -fs ${TOOLS_DIR_REAL} ${TOOLS_DIR}