chiark / gitweb /
add --prefix option; stop appending /debian/po to old-tree; check that target file...
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 15:49:44 +0000 (15:49 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 15:49:44 +0000 (15:49 +0000)
grab-string

index d011637..ef29f91 100755 (executable)
@@ -1,7 +1,13 @@
 #! /bin/sh
 
+PREFIX=
+if [ "$1" = --prefix ]; then
+       PREFIX="$2-"
+       shift 2
+fi
+
 if [ $# -lt 2 ]; then
-       echo "Usage: $0 OLD-TREE STRING" >&2
+       echo "Usage: $0 [--prefix PREFIX] OLD-TREE STRING" >&2
        exit 1
 fi
 
@@ -9,8 +15,10 @@ if ! [ -d debian/po-new ]; then
        cp -a debian/po debian/po-new
 fi
 
-for x in $1/debian/po/*.po; do
+for x in $1/*.po; do
        base=$(basename $x)
+       base="${base#$PREFIX}"
+       [ -e "debian/po-new/$base" ] || continue
        msgconv -t UTF-8 $x | \
                msgattrib --translated - | \
                msggrep -K -e "$2" - | \