This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix unportabilities in dg-extract-results.sh
- From: Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Nov 2008 22:27:12 +0100 (MET)
- Subject: PATCH: Fix unportabilities in dg-extract-results.sh
In the make check output on Solaris 10/x86, I noticed the following errors:
usage: tail [+/-[n][lbc][f]] [file]
tail [+/-[n][l][r|f]] [file]
This is due to the use of tail -n in contrib/dg-extract-results.sh, which
isn't portable. All over the tree, we use tail -<n> instead.
This patch does this and also fixed a typo (two consecutive || signs).
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Fri Nov 21 22:21:00 2008 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* dg-extract-results.sh: Don't use tail -n.
Fixed typo.
Index: dg-extract-results.sh
===================================================================
--- dg-extract-results.sh (revision 142086)
+++ dg-extract-results.sh (working copy)
@@ -411,6 +411,6 @@ cat ${TMP}/var-* | $AWK -f $TOTAL_AWK
# This is ugly, but if there's version output from the compiler under test
# at the end of the file, we want it. The other thing that might be there
# is the final summary counts.
-tail -n 2 $FIRST_SUM | grep -q '^#' || tail -n 2 $FIRST_SUM
+tail -2 $FIRST_SUM | grep -q '^#' | tail -2 $FIRST_SUM
exit 0