BSD doesn't support readlink -f :-(

This commit is contained in:
Kenneth Heafield 2011-11-21 14:46:39 -05:00
parent 5ddd740c16
commit c1ffa8ca52

3
bjam
View File

@ -1,9 +1,8 @@
#!/bin/bash
set -e
self="$(readlink -f "$0")"
if
which bjam >/dev/null 2>/dev/null && #Have a bjam in path
[ "$self" != "$(readlink -f "$(which bjam)")" ] && #bjam in path isn't this script
! grep UFIHGUFIHBDJKNCFZXAEVA "$(which bjam)" >/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)
then
#Delegate to system bjam