From: David Levine Date: Thu, 5 Dec 2013 03:13:55 +0000 (-0600) Subject: Fixed test-mhmail failure on Solaris: its tail doesn't suport -n. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/38de48ccf6bcdac1212d541fa33d7a1f3490484f?ds=inline;hp=-c Fixed test-mhmail failure on Solaris: its tail doesn't suport -n. --- 38de48ccf6bcdac1212d541fa33d7a1f3490484f diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 1caf0399..31d6689e 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -114,10 +114,6 @@ esac # check -nosend # Not supported by compiled mhmail. -#### TEMPORARY hack to diagnose failure on Solaris. -echo before -sh -x mhmail -nosend recipient@example.com -from sender1@localhost -body '' 2>&1 -echo after mhmail -nosend recipient@example.com -from sender1@localhost \ -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err" diff --git a/uip/mhmail b/uip/mhmail index 839b82a7..70758cd6 100755 --- a/uip/mhmail +++ b/uip/mhmail @@ -50,6 +50,11 @@ finddir() { bindir=`finddir $0` nmhbindir=`cd "$bindir" && pwd` +if printf 'OK\n' | tail -n 1 2>&1 | grep OK >/dev/null; then + tail='tail -n' +else + tail=tail +fi #### Checks for missing mandatory arguments.