Synched that to uip/mhmail.
esac
}
+#### Figure out whether or not to use -n with tail.
+case `printf 'OK\n' | tail -n 1 2>&1` in
+ OK) tail='tail -n ' ;;
+ *) tail='tail -' ;;
+esac
if install-mh -check >/dev/null 2>&1; then
# Determine config options from installed nmh.
echo "$tests_summary" >>"$logfile"
echo '===================' >>"$logfile"
[ "$check" = distcheck ] && \
- echo "$checkoutput" | tail -n 4 >>"$logfile"
+ echo "$checkoutput" | ${tail}4 >>"$logfile"
fi
if [ $status -eq 0 ]; then
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
+case `printf 'OK\n' | tail -n 1 2>&1` in
+ OK) tail='tail -n ' ;;
+ *) tail='tail -' ;;
+esac
#### Checks for missing mandatory arguments.