From 141105da768772f08d663320ae3e05df73940a27 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 17 Jan 2006 23:13:44 +0000 Subject: [PATCH] helper for grabbing strings from debian/po directories in other trees --- grab-string | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 grab-string diff --git a/grab-string b/grab-string new file mode 100755 index 0000000..d011637 --- /dev/null +++ b/grab-string @@ -0,0 +1,22 @@ +#! /bin/sh + +if [ $# -lt 2 ]; then + echo "Usage: $0 OLD-TREE STRING" >&2 + exit 1 +fi + +if ! [ -d debian/po-new ]; then + cp -a debian/po debian/po-new +fi + +for x in $1/debian/po/*.po; do + base=$(basename $x) + msgconv -t UTF-8 $x | \ + msgattrib --translated - | \ + msggrep -K -e "$2" - | \ + msgconv -t $(po-charset debian/po-new/$base) - | \ + msgcat --use-first debian/po-new/$base - | \ + sponge debian/po-new/$base +done + +exit 0 -- 2.30.2