mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
More paranoia about which
This commit is contained in:
parent
3e7e101d98
commit
4dbc848363
14
bjam
14
bjam
@ -1,13 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
if
|
set -x
|
||||||
which bjam >/dev/null 2>/dev/null && #Have a bjam in path
|
if
|
||||||
! grep UFIHGUFIHBDJKNCFZXAEVA "$(which bjam)" </dev/null >/dev/null && #bjam in path isn't this script
|
bjam="$(which bjam 2>/dev/null)" && #exists
|
||||||
bjam --help >/dev/null 2>/dev/null && #bjam in path isn't broken (i.e. has boost-build)
|
[ ${#bjam} != 0 ] && #paranoia about which printing nothing then returning true
|
||||||
bjam --version |grep "Boost.Build 201" >/dev/null 2>/dev/null #It's recent enough.
|
! grep UFIHGUFIHBDJKNCFZXAEVA "${bjam}" </dev/null >/dev/null && #bjam in path isn't this script
|
||||||
|
"${bjam}" --help >/dev/null 2>/dev/null && #bjam in path isn't broken (i.e. has boost-build)
|
||||||
|
"${bjam}" --version |grep "Boost.Build 201" >/dev/null 2>/dev/null #It's recent enough.
|
||||||
then
|
then
|
||||||
#Delegate to system bjam
|
#Delegate to system bjam
|
||||||
exec bjam "$@"
|
exec "${bjam}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
top="$(dirname "$0")"
|
top="$(dirname "$0")"
|
||||||
|
Loading…
Reference in New Issue
Block a user