Move update-copyright into build-aux
This is a useful function to update all our copyright years. Move it into build-aux so that it is not lost in the switch to meson. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
1bfae7d14a
commit
27955a0fee
2 changed files with 9 additions and 6 deletions
|
@ -77,9 +77,4 @@ update-po:
|
|||
$(MAKE) -C scripts/po update-po
|
||||
$(MAKE) -C src/pacman/po 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)/ $(OLD)-$(NEW)/" "$$file"; \
|
||||
done
|
||||
|
||||
.PHONY: update-po update-copyright
|
||||
.PHONY: update-po
|
||||
|
|
8
build-aux/update-copyright
Executable file
8
build-aux/update-copyright
Executable file
|
@ -0,0 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
OLD=$1
|
||||
NEW=$2
|
||||
|
||||
for file in $(git grep -l "Copyright .* Pacman Development" | grep -v "\.po"); do \
|
||||
sed -i -e "/Copyright (/s/-${OLD}/-${NEW}/" -e "/Copyright (/s/ ${OLD}/ ${OLD}-${NEW}/" "$file"
|
||||
done
|
Loading…
Add table
Reference in a new issue