maint/utils/update-years.sh: replaced unportable 'sed -i' command.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-12-23 11:36:41 +03:00
parent 2ce0b25cfd
commit fea3a86faf

View File

@ -10,13 +10,13 @@ LINE="Copyright (C)"
for i in $SOURCES; do
# replace year: XXXX-YYYY -> XXXX-ZZZZ
# add year: XXXX -> XXXX-ZZZZ
${SED-sed} -i -e "
${SED-sed} -e "
1,20 {
/$LINE/s/-[0-9]\{4\}$/-$YEAR/
};
1,20 {
/$LINE/s/ [0-9]\{4\}$/&-$YEAR/
}" $i
}" $i > $i.tmp && mv -f $i.tmp $i
done
# special case