wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/utils po2po


From: ott
Subject: [Wesnoth-cvs-commits] wesnoth/utils po2po
Date: Fri, 15 Jul 2005 20:50:27 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     ott <address@hidden>    05/07/16 00:50:27

Modified files:
        utils          : po2po 

Log message:
        add support to po2po for build directory other than source directory

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/utils/po2po.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: wesnoth/utils/po2po
diff -u wesnoth/utils/po2po:1.8 wesnoth/utils/po2po:1.9
--- wesnoth/utils/po2po:1.8     Tue Feb 22 20:17:39 2005
+++ wesnoth/utils/po2po Sat Jul 16 00:50:26 2005
@@ -1,6 +1,14 @@
 #!/bin/sh
 set -e
 
+# where we find the distribution po hierarchy
+BASEDIR=po
+
+# if using a build directory other than source dir, set BUILDDIR to the
+# po directory in the build directory
+#BUILDDIR=testbuild/po
+BUILDDIR=po
+
 # copy relevant messages from SRCDOMAIN to DSTDOMAIN, for LANG
 
 if [ $# -lt 2 ]
@@ -14,37 +22,37 @@
 shift
 shift
 
-if ! [ -r po/$DSTDOMAIN/Makefile ]
+if ! [ -r $BUILDDIR/$DSTDOMAIN/Makefile ]
 then
-    echo "Source not configured in po/$DSTDOMAIN"
+    echo "Source not configured in $BUILDDIR/$DSTDOMAIN"
     exit 1
 fi
 
 if [ $# = 0 ]
 then
-    set -- `cat po/$SRCDOMAIN/LINGUAS`
+    set -- `cat $BASEDIR/$SRCDOMAIN/LINGUAS`
 fi
 
 tmp=`tempfile`
 for LANG in "$@"
 do
     # merge the 2 files
-    msgcat --use-first -F po/$DSTDOMAIN/$LANG.po po/$SRCDOMAIN/$LANG.po >$tmp
-    mv po/$DSTDOMAIN/$LANG.po po/$DSTDOMAIN/$LANG.po.bak
-    mv $tmp po/$DSTDOMAIN/$LANG.po
+    msgcat --use-first -F $BASEDIR/$DSTDOMAIN/$LANG.po 
$BASEDIR/$SRCDOMAIN/$LANG.po >$tmp
+    mv $BASEDIR/$DSTDOMAIN/$LANG.po $BASEDIR/$DSTDOMAIN/$LANG.po.bak
+    mv $tmp $BASEDIR/$DSTDOMAIN/$LANG.po
 
     # sync with DST pot
-    touch -d '1970-01-02' po/$DSTDOMAIN/$LANG.po
-    make -C po/$DSTDOMAIN $LANG.po
+    touch -d '1970-01-02' $BASEDIR/$DSTDOMAIN/$LANG.po
+    make -C $BUILDDIR/$DSTDOMAIN $LANG.po
 
     # clear those obsolete strings added by SRC, but keep ours if any
-    msgattrib --no-obsolete po/$DSTDOMAIN/$LANG.po >$tmp
-    msgcat --use-first -F $tmp po/$DSTDOMAIN/$LANG.po.bak > 
po/$DSTDOMAIN/$LANG.po
+    msgattrib --no-obsolete $BASEDIR/$DSTDOMAIN/$LANG.po >$tmp
+    msgcat --use-first -F $tmp $BASEDIR/$DSTDOMAIN/$LANG.po.bak > 
$BASEDIR/$DSTDOMAIN/$LANG.po
 
-    touch -d '1970-01-02' po/$DSTDOMAIN/$LANG.po
-    make -C po/$DSTDOMAIN $LANG.po
+    touch -d '1970-01-02' $BASEDIR/$DSTDOMAIN/$LANG.po
+    make -C $BUILDDIR/$DSTDOMAIN $LANG.po
 
     # make sure the timestamp is fixed or cvs gets confused
-    touch po/$DSTDOMAIN/$LANG.po
+    touch $BASEDIR/$DSTDOMAIN/$LANG.po
 done
 rm $tmp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]