From 461a3ece57a6bbf69e7549b527f113ef91d319e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 23 May 2025 11:21:54 +0200 Subject: [PATCH] fix: correctly copy date when udating POT files This avoids updates containing just timestamp change. --- scripts/copy-pot-date.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/copy-pot-date.sh b/scripts/copy-pot-date.sh index 1a157ba0..d886f915 100755 --- a/scripts/copy-pot-date.sh +++ b/scripts/copy-pot-date.sh @@ -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"