diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-11-02 14:30:30 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-11-02 14:32:59 +0000 |
commit | 400e93d8afa50fc1dd87a926b02697367c8ffec7 (patch) | |
tree | 841c346ff290718a9a75a29b680d42837a29ce95 | |
parent | 1c31822f6777e980b9966c2d3caa4e3345f5cedd (diff) |
scripts: Improve check for tartan script in tartan-build script
Hide some stderr spew on failure, and allow using the tartan script in
the same directory as tartan-build, even if that directory is not in
$PATH.
-rw-r--r-- | scripts/tartan-build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/tartan-build b/scripts/tartan-build index 840bcbc..c6d5a40 100644 --- a/scripts/tartan-build +++ b/scripts/tartan-build @@ -1,7 +1,11 @@ #!/bin/sh -if [ -x `which tartan` ]; then +clang_bin_dir=`dirname "$0"` + +if which tartan &> /dev/null; then tartan=`which tartan` +elif [ -x $clang_bin_dir/tartan ]; then + tartan="$clang_bin_dir/tartan" else echo "Error: Could not find tartan script. Make sure Tartan is installed in your PATH." >& 2 exit 1 |