Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bjam
diff options
context:
space:
mode:
authorKenneth Heafield <kenlm@kheafield.com>2011-11-21 23:41:10 +0400
committerKenneth Heafield <kenlm@kheafield.com>2011-11-21 23:41:10 +0400
commit5ddd740c16be44e41a82745bfbd0f20428ad0d6f (patch)
tree033898c93700f6ab4f06b68de45c886a45ed5b19 /bjam
parentbecf9f466ae6dd983d2245bc1860beb78ba52120 (diff)
Jon Clark put . in his path
Diffstat (limited to 'bjam')
-rwxr-xr-xbjam9
1 files changed, 7 insertions, 2 deletions
diff --git a/bjam b/bjam
index 8a61f3f65..2ae074a4b 100755
--- a/bjam
+++ b/bjam
@@ -1,7 +1,12 @@
#!/bin/bash
set -e
-#This checks for bjam including boost-build.
-if bjam --help >/dev/null 2>/dev/null; then
+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
+ bjam --help >/dev/null 2>/dev/null #bjam in path isn't broken (i.e. has boost-build)
+then
+ #Delegate to system bjam
exec bjam "$@"
fi