mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Old buggy bjam always returns 0. Detect+reject.
http://boost.2283326.n4.nabble.com/bjam-exit-code-always-zero-td2696668.html
This commit is contained in:
parent
dca9d8952d
commit
be76c67f96
3
bjam
3
bjam
@ -4,7 +4,8 @@ if
|
|||||||
bjam="$(which bjam 2>/dev/null)" && #exists
|
bjam="$(which bjam 2>/dev/null)" && #exists
|
||||||
[ ${#bjam} != 0 ] && #paranoia about which printing nothing then returning true
|
[ ${#bjam} != 0 ] && #paranoia about which printing nothing then returning true
|
||||||
! grep UFIHGUFIHBDJKNCFZXAEVA "${bjam}" </dev/null >/dev/null && #bjam in path isn't this script
|
! grep UFIHGUFIHBDJKNCFZXAEVA "${bjam}" </dev/null >/dev/null && #bjam in path isn't this script
|
||||||
"${bjam}" --sanity-test 2>/dev/null |grep Sane >/dev/null #The test in jam-files/sanity.jam passes
|
"${bjam}" --sanity-test 2>/dev/null |grep Sane >/dev/null && #The test in jam-files/sanity.jam passes
|
||||||
|
(cd jam-files/fail && ! "${bjam}") >/dev/null #Returns non-zero on failure
|
||||||
then
|
then
|
||||||
#Delegate to system bjam
|
#Delegate to system bjam
|
||||||
exec "${bjam}" "$@"
|
exec "${bjam}" "$@"
|
||||||
|
4
jam-files/fail/Jamroot
Normal file
4
jam-files/fail/Jamroot
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
actions fail {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
make fail : : fail ;
|
Loading…
Reference in New Issue
Block a user