language-data/scripts/copy-pot-date.sh

14 lines
268 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2023-01-13 09:57:01 +01:00
# 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"