This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Remove trailing blank lines when generating INSTALL
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 9 Jul 2013 12:46:59 -0700 (PDT)
- Subject: Re: Remove trailing blank lines when generating INSTALL
- References: <Pine dot LNX dot 4 dot 64 dot 1306282214071 dot 15167 at digraph dot polyomino dot org dot uk> <20130628222721 dot 98FFA2C09C at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1307012230080 dot 13535 at digraph dot polyomino dot org dot uk>
> + awk 'NF == 0 { ++n; next } \
Use $(AWK).
> + NF != 0 { while (n-- > 0) print ""; n = 0; print }' \
> + < $@-tmp > $@-tmp2
> + mv -f $@-tmp2 $@
> + rm -f $@-tmp
> -chmod a-w $@
Put the rm before the mv (fewer stale files left behind if mv fails).
chmod $@-tmp2 before the mv.
Good with those changes.
Thanks,
Roland