Add warning and instructions for new files
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 21 Oct 2006 20:39:37 +0000 (20:39 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 21 Oct 2006 20:39:37 +0000 (20:39 +0000)
cp-po

diff --git a/cp-po b/cp-po
index 0957a9c606608773828ffb8b3c7ac2c144a625ab..01f412dd8b2b5ea4ed112a8a555e42d607b1ca51 100755 (executable)
--- a/cp-po
+++ b/cp-po
@@ -49,7 +49,10 @@ for srcfile in $(find "$srcdir" -name '*.po'); do
                fi
                if [ "$srccat" = "$destcat" ]; then
                        targetdir=$(echo $y | sed 's,nls\.mk$,po,')
-                       if ! diff -I '\$\(Header\|Id\|PostgreSQL\):.*\$' $srcfile $targetdir/$lang.po >/dev/null; then
+                       if [ ! -e $targetdir/$lang.po ]; then
+                               echo "NEW: $targetdir/$lang.po --- file will be copied, but do \"cvs add\" and fix $y by hand" 1>&2
+                       fi
+                       if [ ! -e $targetdir/$lang.po ] || ! diff -I '\$\(Header\|Id\|PostgreSQL\):.*\$' $srcfile $targetdir/$lang.po >/dev/null; then
                                echo " cp $srcfile $targetdir/$lang.po"
                                $run cp $srcfile $targetdir/$lang.po
                        fi