2022-01-02 11:01:09 +03:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
YEAR=`date +%Y`
|
|
|
|
|
|
|
|
SOURCES="`find lib src tests -name '*.c'`"
|
2023-12-23 11:38:09 +03:00
|
|
|
SOURCES="$SOURCES src/man2hlp/man2hlp.in"
|
2024-08-10 20:51:31 +03:00
|
|
|
SOURCES="$SOURCES tests/src/vfs/extfs/helpers-list/test_all"
|
2022-01-02 11:01:09 +03:00
|
|
|
|
|
|
|
LINE="Copyright (C)"
|
|
|
|
|
2023-12-23 11:38:09 +03:00
|
|
|
for i in $SOURCES; do
|
2022-01-02 11:01:09 +03:00
|
|
|
# replace year: XXXX-YYYY -> XXXX-ZZZZ
|
|
|
|
# add year: XXXX -> XXXX-ZZZZ
|
2023-12-23 11:36:41 +03:00
|
|
|
${SED-sed} -e "
|
2022-01-02 11:01:09 +03:00
|
|
|
1,20 {
|
|
|
|
/$LINE/s/-[0-9]\{4\}$/-$YEAR/
|
|
|
|
};
|
|
|
|
1,20 {
|
|
|
|
/$LINE/s/ [0-9]\{4\}$/&-$YEAR/
|
2023-12-23 11:36:41 +03:00
|
|
|
}" $i > $i.tmp && mv -f $i.tmp $i
|
2022-01-02 11:01:09 +03:00
|
|
|
done
|
|
|
|
|
|
|
|
# special case
|
2023-05-19 18:29:56 +03:00
|
|
|
${SED-sed} -e "/$LINE/s/-[0-9]\{4\} the/-$YEAR the/" src/editor/editwidget.c > src/editor/editwidget.c.tmp && \
|
|
|
|
mv -f src/editor/editwidget.c.tmp src/editor/editwidget.c
|