language-data/scripts/copy-pot-date.sh
Michal Čihař 461a3ece57 fix: correctly copy date when udating POT files
This avoids updates containing just timestamp change.
2025-05-23 11:27:06 +02:00

13 lines
268 B
Bash
Executable file

#!/bin/sh
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: MIT
REGX='^\("POT-Creation-Date: [0-9 +:-]*\)'
# Grab date from other branch
REPL=$(sed -n "s/$REGX.*/\\1/p" "$1")
# Push it into other files
sed -i -e "s/$REGX/$REPL/" "$2"