]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Fall back to toolchain if a command is not available.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Nov 2009 16:09:19 +0000 (17:09 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Nov 2009 16:09:19 +0000 (17:09 +0100)
tools/naoki-functions

index 50f0622ce97485a443a7af9da18944fdc46b5267..8e0f816c3f7eb43816a39d13284ddd930de381fb 100644 (file)
@@ -179,8 +179,11 @@ function naoki_cmd() {
        log DEBUG "Running command \"${cmd}\" - chroot=${with_chroot}."
        
        local path="/sbin:/usr/sbin:/bin:/usr/bin"
-       if [ "${TOOLCHAIN}" = "1" ] || [ ! -e "${BUILD_DIR}/usr/bin/env" ]; then
-               path="${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin:${path}"
+       local toolchain_path="${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin"
+       if [ "${TOOLCHAIN}" = "1" ]; then
+               path="${toolchain_path}:${path}"
+       else
+               path="${path}:${toolchain_path}"
        fi
        log DEBUG "  PATH : ${path}"