diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-07 09:58:14 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-07 09:58:14 (GMT) |
commit | 674ee531e604751354c8998a3aced5f0d26b2713 (patch) | |
tree | 67de9d600afa94db4516fe31306470f21ead7983 /scripts/crosstool.sh | |
parent | 8331b26c77eeef984d787a1c1db3aa384ebd2964 (diff) |
Silence "which" being verbose in some distros. (eg. Mandriva's which spawns "foobar was not found in /bin:/usr/bin:...." directly on stderr)
Diffstat (limited to 'scripts/crosstool.sh')
-rwxr-xr-x | scripts/crosstool.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index ddb2fb6..0775dcb 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -293,10 +293,11 @@ if [ -z "${CT_RESTART}" ]; then CT_DoLog DEBUG "Making build system tools available" mkdir -p "${CT_PREFIX_DIR}/bin" for tool in ar as dlltool gcc g++ gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do - if [ -n "`which ${tool}`" ]; then - ln -sfv "`which ${tool}`" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}" - ln -sfv "`which ${tool}`" "${CT_PREFIX_DIR}/bin/${CT_UNIQ_BUILD}-${tool}" - ln -sfv "`which ${tool}`" "${CT_PREFIX_DIR}/bin/${CT_HOST}-${tool}" + tmp=`CT_Which ${tool}` + if [ -n "${tmp}" ]; then + ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}" + ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_UNIQ_BUILD}-${tool}" + ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_HOST}-${tool}" fi |CT_DoLog DEBUG done |