From: Peter Eisentraut Date: Wed, 14 Oct 2009 21:11:01 +0000 (+0000) Subject: Add -L option to specify an inclusion list X-Git-Url: http://git.postgresql.org/gitweb/delmail?a=commitdiff_plain;h=7e9323d13dda80a97a27136f63d2bcec84fc6a5c;p=pgtranslation%2Fadmin.git Add -L option to specify an inclusion list --- diff --git a/cp-po b/cp-po index 93d19c3..9693e5c 100755 --- a/cp-po +++ b/cp-po @@ -16,13 +16,14 @@ adjustcvskeywords=true force=false run=true -TEMP=$(getopt fkn "$@") +TEMP=$(getopt fkL:n "$@") eval set -- "$TEMP" while true; do case $1 in -f) force=true; shift;; -k) adjustcvskeywords=false; shift;; + -L) qualfile=$2; shift; shift;; -n) run=false; shift;; --) shift; break;; esac @@ -47,6 +48,10 @@ for srcfile in $(find "$srcdir" -name '*.po'); do lang=$(expr $base : '\([a-z][a-zA-Z_]*\)') srccat=$(expr $base : '.*/\([^/]*\)\.po$') + if [ -n "$qualfile" ] && ! grep -q -F "$srccat/$lang" "$qualfile"; then + continue + fi + if ! msgfmt -o /dev/null -c -v $srcfile 2>/dev/null; then echo "$me: $srcfile has errors" 1>&2 msgfmt -o /dev/null -c -v $srcfile || :