From 3fbcec44f5923a69f76a725e4f6e5da29ba8789f Mon Sep 17 00:00:00 2001 From: csilvers Date: Wed, 14 May 2008 08:03:55 +0000 Subject: 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 --- pump.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pump.in') 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 -- cgit v1.2.1