[pacman-dev] [PATCH 1/3] Add make rule to update copyright years
Allan McRae
allan at archlinux.org
Wed Jan 21 06:38:30 UTC 2015
On 21/01/15 16:31, Allan McRae wrote:
> Usage: make update-copyright OLD=2014 NEW=2015
>
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> Makefile.am | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index d2a11eb..6c97b29 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -62,6 +62,11 @@ update-po:
> $(MAKE) -C scripts/po update-po
> $(MAKE) -C src/pacman/po update-po
>
> -.PHONY: update-po
> +update-copyright:
> + for file in $(shell sh -c 'git grep -l "Copyright .* Pacman Development" | grep -v "\.po"'); do \
> + sed -i -e "/Copyright (/s/-$(OLD)/-$(NEW)/" -e "/Copyright (/s/ $(OLD)/ $(NEW)/" "$$file"; \
The second sed should be:
s/ $(OLD)/ $(OLD)-$(NEW)/
> + done
> +
> +.PHONY: update-po update-copyright
>
> # vim:set noet:
>
More information about the pacman-dev
mailing list