diff options
author | Bertram <bertram@cegetel.net> | 2010-02-07 17:16:25 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-02-07 17:19:59 +0100 |
commit | 261d22fc915bf8066ce0986e216b7186ceeda375 (patch) | |
tree | 1a9523da28806b33583d6155748e64528df7862c /tools/update-copyright.sh | |
parent | 057b17859cb9fadf5ce633d31eade2dd75ddbb29 (diff) | |
download | mana-261d22fc915bf8066ce0986e216b7186ceeda375.tar.gz mana-261d22fc915bf8066ce0986e216b7186ceeda375.tar.bz2 mana-261d22fc915bf8066ce0986e216b7186ceeda375.tar.xz mana-261d22fc915bf8066ce0986e216b7186ceeda375.zip |
Updated Copyright year to 2010!
Also added the update copyright tool from the Wormux Team.
( And not forgetting credit's due. :P )
Diffstat (limited to 'tools/update-copyright.sh')
-rwxr-xr-x | tools/update-copyright.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/update-copyright.sh b/tools/update-copyright.sh new file mode 100755 index 00000000..67deaaa4 --- /dev/null +++ b/tools/update-copyright.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (C) 2001-2010 Wormux Team. +# Copyright (C) 2010 The ManaWorld Development Team. + +new_year="$1" +[[ -z $new_year ]] && echo "Missing parameter: year" && exit 1 + +[[ ! -e src ]] && echo "This script should be ran from the top mana/manaserv dir" && exit 2 + +tmp_file="w$RANDOM$RANDOM$RANDOM$RANDOM" +[[ -e $tmp_file ]] && tmp_file="w$RANDOM$RANDOM$RANDOM$RANDOM" + +# update the dates, creating the interval if it doesn't exist yet +find -iname "*.cpp" -or -iname "*.h" -or -iname "*.hpp" | + xargs sed -i "/Copyright.*The Mana World Development Team/ s,\(20[0-9]*\) \|\(20[0-9]*\)-20[0-9]* ,\1\2-$new_year ," + +# do a semi-automated commit check +git diff > $tmp_file +echo "The next +/- counts mentioning copyrights should match:" +grep "^[-+][^-+]" $tmp_file | sort | uniq -c +echo "If they don't, try finding the offending files with grep -rl <\$bad_line>" + + |