diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-08-09 17:56:29 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-08-09 17:56:29 +0200 |
commit | 96de92c10523a97c1063a3ee2bfe584969343338 (patch) | |
tree | 8abb9af7febcbb6b454c40afa96ffd777876fb9a | |
parent | 75cfea21107015b72315231cf8aefffb32a83a18 (diff) | |
download | ptxdist-96de92c10523a97c1063a3ee2bfe584969343338.tar.gz ptxdist-96de92c10523a97c1063a3ee2bfe584969343338.tar.xz |
ptxdist: pick the last toolchain when more than one is found
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index a47d9689f..80bce358b 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -1623,7 +1623,7 @@ do_select_toolchain_guess() hint="/opt/${vendor}*/${target}/${gcc}${java}${libc}*/bin" ptxd_get_path ${hint} fi - toolchain="${ptxd_reply[@]}" + toolchain=("${ptxd_reply[@]}") # number of items in array == number of found toolchains local num="${#ptxd_reply[@]}" @@ -1640,18 +1640,15 @@ do_select_toolchain_guess() local old_ifs="${IFS}" IFS=" " - toolchain="${toolchain[*]}" + local list="${toolchain[*]}" IFS="${old_ifs}" ptxd_dialog_msgbox \ - "error: more than one toolchain found, matching\n" \ + "warning: more than one toolchain found, matching\n" \ " '${hint}':\n\n" \ - "${toolchain}" \ - "\n" \ - " please use 'ptxdist toolchain </path/to/toolchain>' to select your toolchain" - - return 1 + "${list}" fi + toolchain="${toolchain[$[num-1]]}" } |