[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kde-i18n
From: David Faure <faure () kde ! org>
Date: 2005-02-07 20:02:55
Message-ID: 20050207200255.051E21D1CD () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
Many fixes - including not running "cvs rm -f" without arguments :/
M +37 -25 concat_po_files 1.3
--- kde-i18n/concat_po_files #1.2:1.3
@@ -38,30 +38,42 @@
{
newpofile="$1"
- echo "Output file: $newpofile"
shift
- echo "Input files: $*"
- if test $into -eq 0 -a -f "$newpofile"; then
- echo "$newpofile already exists! Please check and delete all input files, then \
launch this script again."
- exit 1
- fi
- destexists=0
- test -f $newpofile && destexists=1
- msgcat --to-code=UTF-8 --no-wrap $* > out.tmp || exit 1
- mv -f out.tmp $newpofile
-
- relpath=`echo $newpofile | sed -e 's,^\./,,;s,^[^/]*/messages/,,'` # remove \
language
- template="templates/${relpath}t"
- if test -f $template; then
- echo "Merging with template $template"
- ./merge.sh $newpofile $template || exit 1
- test -f $newpofile || exit 1
- echo -n "$newpofile: "
- msgfmt -o /dev/null --statistics $newpofile
-
- test $into -eq 1 && shift # don't remove existing dest when using -into
- cvs rm -f $*
- test $destexists -eq 0 && cvs add $newpofile
- else
- echo "No template found at $template"
+ inputfiles=$*
+ if test "$newpofile" != "$inputfiles"; then
+ if test $into -eq 0 -a -f "$newpofile"; then
+ echo "$newpofile already exists! Please check and delete all input files, then \
launch this script again." + exit 1
+ fi
+
+ echo "Output file: $newpofile"
+ echo "Input files: $inputfiles"
+
+ destexists=0
+ if test -f "$newpofile"; then
+ destexists=1
+ echo -n "Initially, $newpofile: "
+ msgfmt -o /dev/null --statistics $newpofile
+ fi
+
+ msgcat --to-code=UTF-8 --no-wrap $inputfiles > out.tmp || exit 1
+ mv -f out.tmp $newpofile
+
+ relpath=`echo $newpofile | sed -e 's,^\./,,;s,^[^/]*/messages/,,'` # remove \
language + template="templates/${relpath}t"
+ if test -f $template; then
+ echo "Merging with template $template"
+ ./merge.sh $newpofile $template || exit 1
+ test -f $newpofile || exit 1
+ echo -n "$newpofile: "
+ msgfmt -o /dev/null --statistics $newpofile
+
+ test $into -eq 1 && shift # don't remove existing dest when using -into
+ if test -n "$inputfiles"; then
+ cvs rm -f $inputfiles
+ fi
+ test $destexists -eq 0 && cvs add $newpofile
+ else
+ echo "No template found at $template"
+ fi
fi
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic