[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove copyright from man/*.x ?
From: |
Pádraig Brady |
Subject: |
Re: remove copyright from man/*.x ? |
Date: |
Tue, 18 Aug 2015 07:39:43 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 17/08/15 13:32, Bernhard Voelker wrote:
> +# Ensure that non-trivial .x files in the 'man/' subdirectory,
> +# i.e., files exceeding a line count of 20 or a byte count of 1000,
> +# contain a Copyright notice.
> +.PHONY: sc_man_check_x_copyright
> +sc_man_check_x_copyright:
> + @t=$@-t; \
> + cd $(srcdir) && wc -cl man/*.x | head -n-1 \
> + | awk '$$1 >= 20 || $$2 >= 1000 {print $$3}' \
> + | $(ASSORT) > $$t; \
> + xargs grep -l 'Copyright .* Free Software Foundation' < $$t \
> + | $(ASSORT) -u | diff - $$t \
> + || { echo 1>&2 '$@: exceeding file size/line count limit' \
> + '- please add a copyright note'; rm $$t; exit 1; }; \
> + rm $$t
> +
I see that `grep -L` is already used in maint.mk, and is widely
available as FreeBSD and OS X use GNU grep or a compat replacement.
Therefore it could be simplified to avoid temp files like:
awk ... | xargs grep -L 'Copy...' | grep . && { echo err; exit 1; }
cheers,
Pádraig
- remove copyright from man/*.x ?, Bernhard Voelker, 2015/08/16
- Re: remove copyright from man/*.x ?, Assaf Gordon, 2015/08/16
- Re: remove copyright from man/*.x ?, Bernhard Voelker, 2015/08/16
- Re: remove copyright from man/*.x ?, Jim Meyering, 2015/08/16
- Re: remove copyright from man/*.x ?, Bernhard Voelker, 2015/08/17
- Re: remove copyright from man/*.x ?,
Pádraig Brady <=
- Re: remove copyright from man/*.x ?, Bernhard Voelker, 2015/08/18
- Re: remove copyright from man/*.x ?, Pádraig Brady, 2015/08/18
- Re: remove copyright from man/*.x ?, Bernhard Voelker, 2015/08/18