summaryrefslogtreecommitdiff
path: root/pump.in
diff options
context:
space:
mode:
authorcsilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917>2008-05-14 08:03:55 +0000
committercsilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917>2008-05-14 08:03:55 +0000
commit3fbcec44f5923a69f76a725e4f6e5da29ba8789f (patch)
tree329e33873db90e941b450b92ad4eab3ff18da542 /pump.in
parentc592828a44571badf5e1279a61e7461655b08b70 (diff)
downloaddistcc-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-xpump.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/pump.in b/pump.in
index 3097682..72a44ff 100755
--- a/pump.in
+++ b/pump.in
@@ -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