cryptonas/scripts/revert_unchanged_po_files.sh
lars e9c48192ee minor language fix
script for reverting unimportant po-file changes
2006-12-19 16:06:52 +00:00

15 lines
534 B
Bash
Executable file

#!/bin/sh
#
# run this script whenever you used update_po_files.sh to remove all changes of files.
# It reverts all po-files where just the POT-Creation-Date header line was changed (not new translations)
#
BASE_DIR=$(cd $(dirname "$0")/..; pwd)
cd "$BASE_DIR"
svn stat intl plugins | grep "\.po$" | cut -d " " -f 2- | while read po_file
do test -z "$(svn diff $po_file)" && continue
diff=$(svn diff "$po_file" | grep "^\+" | grep -v "^\+\{3\}" | grep -v "POT-Creation-Date")
test -z "$diff" && svn revert "$po_file"
done