diff options
author | csilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917> | 2008-05-14 08:03:55 +0000 |
---|---|---|
committer | csilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917> | 2008-05-14 08:03:55 +0000 |
commit | 3fbcec44f5923a69f76a725e4f6e5da29ba8789f (patch) | |
tree | 329e33873db90e941b450b92ad4eab3ff18da542 /pump.in | |
parent | c592828a44571badf5e1279a61e7461655b08b70 (diff) | |
download | distcc-3fbcec44f5923a69f76a725e4f6e5da29ba8789f.tar.gz |
Ick. On some systems test is in /bin, and in others /usr/bin. Now
figure out where it is before running it, and fall back on the shell
test if no binary can be found.
Tested by running 'make check' on a FreeBSD machine (/bin/test) and
linux (/usr/bin/test).
Reviewed by fergus@google.com
git-svn-id: http://distcc.googlecode.com/svn/trunk@235 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'pump.in')
-rwxr-xr-x | pump.in | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -251,7 +251,14 @@ StartIncludeServer() { # solaris sh's built-in test does not support -S, so we need to use # the binary. - if /usr/bin/test ! -S "$socket"; then + if [ -x /bin/test ]; then + TEST=/bin/test + elif [ -x /usr/bin/test ]; then + TEST=/usr/bin/test + else + TEST=test + fi + if $TEST ! -S "$socket"; then echo "__________Expected a socket at '$socket'" 1>&2 PrintIncludeServerStatusMessage 1 return 1 |