summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJesusalva Jesusalva <jesusalva@themanaworld.org>2024-02-16 16:40:35 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2024-02-16 16:40:35 +0000
commit775392e472933be8d1d76619894efc0671f0c02d (patch)
treecacf9d24264315d12c7983ae3b176ad7c67bdddf /tools
parent0144ab308fed93b96b3a819dfe7d9940ee9eedb9 (diff)
downloadplus-775392e472933be8d1d76619894efc0671f0c02d.tar.gz
plus-775392e472933be8d1d76619894efc0671f0c02d.tar.bz2
plus-775392e472933be8d1d76619894efc0671f0c02d.tar.xz
plus-775392e472933be8d1d76619894efc0671f0c02d.zip
Client rebranding: Partly import changes from !28
Co-Authored-By: jak1 <jak1@themanaworld.org> Co-Authored-By: jesusalva <jesusalva@themanaworld.org> Co-Authored-By: Fedja Beader <fedja@protonmail.ch>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update-copyright.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/update-copyright.sh b/tools/update-copyright.sh
index d681ebb7f..4df05c030 100755
--- a/tools/update-copyright.sh
+++ b/tools/update-copyright.sh
@@ -2,19 +2,23 @@
# 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 ..
-new_year="$1"
-[[ -z $new_year ]] && echo "Missing parameter: year" && exit 1
+if [[ $1 != "" ]]; then
+ new_year="$1"
+else
+ new_year=$(date +'%Y')
+fi
-[[ ! -e src ]] && echo "This script should be ran from the top manaplus dir" && exit 2
+[[ ! -e src ]] && echo "This script should be ran from the top manaverse dirs ./tools/ path." && 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 ManaPlus Developers/ s,\(20[0-9]*\) \|\(20[0-9]*\)-20[0-9]* ,\1\2-$new_year ,"
+ xargs sed -i "/Copyright.*The ManaVerse 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