From: Michael Tremer Date: Sat, 21 Nov 2009 16:09:19 +0000 (+0100) Subject: naoki: Fall back to toolchain if a command is not available. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1713869ac73a56cc00f6a268beb09fe665d5fe3;p=ipfire-3.x.git naoki: Fall back to toolchain if a command is not available. --- diff --git a/tools/naoki-functions b/tools/naoki-functions index 50f0622ce..8e0f816c3 100644 --- a/tools/naoki-functions +++ b/tools/naoki-functions @@ -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}"