Skip to content

Commit f4d7736

Browse files
committed
fix: correctly copy date when udating POT files
This avoids updates containing just timestamp change.
1 parent 97bdcbf commit f4d7736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/copy-pot-date.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#
55
# SPDX-License-Identifier: MIT
66

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

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

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

0 commit comments

Comments
 (0)