summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-03-17 11:14:34 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-03-17 14:30:15 +0100
commita04ae278523ff025b36ddd33705e02f4624fe8d2 (patch)
tree2649f70a354c0c4d59d4498a3ef7c4fb3b02e776
parent7c0b5a6f83e3225fc182c6376a3845804a1a252f (diff)
downloadptxdist-a04ae278523ff025b36ddd33705e02f4624fe8d2.tar.gz
ptxdist-a04ae278523ff025b36ddd33705e02f4624fe8d2.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>
-rwxr-xr-xbin/ptxdist16
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 \