diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-03-29 02:16:00 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-04-06 22:53:37 +0200 |
commit | b3ab76d90d265e219fafa989ba55bbc53bea52f4 (patch) | |
tree | 9b7b398bb0b3ef9856f83eabf85ecc5c2fcad914 /tools/update-copyright.sh | |
parent | 76b8c48d441487accff8eeb7027108ddcf2c98d0 (diff) | |
download | manaverse-b3ab76d90d265e219fafa989ba55bbc53bea52f4.tar.gz manaverse-b3ab76d90d265e219fafa989ba55bbc53bea52f4.tar.bz2 manaverse-b3ab76d90d265e219fafa989ba55bbc53bea52f4.tar.xz manaverse-b3ab76d90d265e219fafa989ba55bbc53bea52f4.zip |
Revert "Client rebranding: Partly import changes from !28"
This reverts commit 775392e472933be8d1d76619894efc0671f0c02d.
[skip ci]
Diffstat (limited to 'tools/update-copyright.sh')
-rwxr-xr-x | tools/update-copyright.sh | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/update-copyright.sh b/tools/update-copyright.sh index 4df05c030..d681ebb7f 100755 --- a/tools/update-copyright.sh +++ b/tools/update-copyright.sh @@ -2,23 +2,19 @@ # Copyright (C) 2001-2010 Wormux Team. # Copyright (C) 2010 The ManaWorld Development Team. # Copyright (C) 2012-2016 The ManaPlus Developers. -# Copyright (C) 2021-2023 The ManaVerse Developers. cd .. -if [[ $1 != "" ]]; then - new_year="$1" -else - new_year=$(date +'%Y') -fi +new_year="$1" +[[ -z $new_year ]] && echo "Missing parameter: year" && exit 1 -[[ ! -e src ]] && echo "This script should be ran from the top manaverse dirs ./tools/ path." && exit 2 +[[ ! -e src ]] && echo "This script should be ran from the top manaplus 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" -or -iname "*.inc" -or -iname "*.cc" | - xargs sed -i "/Copyright.*The ManaVerse Developers/ s,\(20[0-9]*\) \|\(20[0-9]*\)-20[0-9]* ,\1\2-$new_year ," + xargs sed -i "/Copyright.*The ManaPlus Developers/ s,\(20[0-9]*\) \|\(20[0-9]*\)-20[0-9]* ,\1\2-$new_year ," # do a semi-automated commit check git diff > $tmp_file |