diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-03-17 11:14:34 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-03-21 10:33:07 +0100 |
commit | e9df9a0112a2f98b336784acc9b2a3e7da5a7497 (patch) | |
tree | 3578e37b8f2ad8c17cfc937810ba8e2da7c41331 | |
parent | 5ae45308cb2ad780139731cbe85d37b079d980cb (diff) | |
download | ptxdist-e9df9a0112a2f98b336784acc9b2a3e7da5a7497.tar.gz ptxdist-e9df9a0112a2f98b336784acc9b2a3e7da5a7497.tar.xz |
ptxdist: relax toolchain vendor check
before: "vendor is" == "vendor should"
after: "vendor is" starts with "vendor should"
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
(cherry picked from commit a04ae278523ff025b36ddd33705e02f4624fe8d2)
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 7d9b8595b..86eeabd9f 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -601,14 +601,18 @@ check_compiler() { # both vendor strings are present. Check them local vendor_is="$(source "${vendor_def}" && echo ${PTXCONF_PROJECT})" - if [ "${vendor_is}" != "${vendor_should}" ]; then + case "${vendor_is}" in + "${vendor_should}"*) + ;; + *) echo echo "${PTXDIST_LOG_PROMPT}error: wrong toolchain vendor: Cannot continue! Vendor is '${vendor_is}'," echo "${PTXDIST_LOG_PROMPT}error: specified: ${vendor_should}" echo "${PTXDIST_LOG_PROMPT}error: found: ${vendor_is}" echo exit 1 - fi + ;; + esac } local compiler_prefix="$(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)" @@ -1600,10 +1604,14 @@ do_select_toolchain_guess() local hint="/opt/${vendor}/${target}/${gcc}${java}${libc}*/bin" # let the shell expand the "*" in the hint, put it into an array - toolchain=($(ls -d ${hint} 2>/dev/null)) + if ! ptxd_get_path ${hint}; then + hint="/opt/${vendor}*/${target}/${gcc}${java}${libc}*/bin" + ptxd_get_path ${hint} + fi + toolchain="${ptxd_reply[@]}" # number of items in array == number of found toolchains - local num="${#toolchain[@]}" + local num="${#ptxd_reply[@]}" if [ ${num} -eq 0 ]; then ptxd_dialog_msgbox \ |