Make it actually work.
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 8 Oct 2005 13:33:32 +0000 (13:33 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 8 Oct 2005 13:33:32 +0000 (13:33 +0000)
cp-po

diff --git a/cp-po b/cp-po
index 621c3ac07e4db461f998de2568eaa41312ba418d..cb598e6cc5269d58581ffb554ec2038185b2ab89 100755 (executable)
--- a/cp-po
+++ b/cp-po
@@ -32,14 +32,15 @@ for srcfile in $(find "$srcdir" -name '*.po'); do
        srccat=$(expr $base : '.*/\([^/]*\)\.po$')
 
        for y in $nls_mks; do
-               destcat=$(cat $y | sed -n 's/CATALOG_NAME[\t ]*:*= *\([^ ]*\)$/\1/p')
+               destcat=$(cat $y | sed -n 's/CATALOG_NAME.*:*= *\([^ ]*\)$/\1/p')
                if [ -z "$destcat" ]; then
                        echo "$me: could not determine catalog name from $y; skipped" 1>&2
                        continue
                fi
                if [ "$srccat" = "$destcat" ]; then
                        targetdir=$(echo $y | sed 's,nls\.mk$,po,')
-                       echo "cp $srcfile $targetdir/$lang.po"
+                       echo " cp $srcfile $targetdir/$lang.po"
+                       cp $srcfile $targetdir/$lang.po
                fi
        done
 done