fix: correctly copy date when udating POT files

This avoids updates containing just timestamp change.
This commit is contained in:
Michal Čihař 2025-05-23 11:21:54 +02:00
parent cce2fb3192
commit 461a3ece57

View file

@ -4,10 +4,10 @@
#
# SPDX-License-Identifier: MIT

REGX='^"POT-Creation-Date:.*'
REGX='^\("POT-Creation-Date: [0-9 +:-]*\)'

# Grab date from other branch
REPL=$(grep "$REGX" "$1" | sed -e 's/\\\\/\\\\\\\\/')
REPL=$(sed -n "s/$REGX.*/\\1/p" "$1")

# Push it into other files
sed -i -e "s/$REGX/$REPL/" "$2"