#! /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