]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: If ${TOOLS_DIR} points to right directory.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Dec 2009 10:33:26 +0000 (11:33 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Dec 2009 10:33:26 +0000 (11:33 +0100)
tools/naoki-functions

index fbcc2c2cff39986c18d05acf1301080efcd0db19..fa9705efc9becad2ab8346cc48aa367d1af601ab 100644 (file)
@@ -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}