Add backport script.

This commit is contained in:
Andrius Štikonas 2010-09-08 20:14:27 +03:00
parent 91298df5fd
commit 997b2c7f25
1 changed files with 17 additions and 0 deletions

17
backport Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
source "`dirname $0`/ths-variables"
./poupdate -NS trunk stable pot-stable
./poupdate -NS doc-trunk doc-stable doc-pot-stable
echo -e $BLUE"Running sed script on all files..."$ENDCOLOR
for po in `find stable doc-stable -follow -name "*.po"`; do
sed -ie 's/\"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n%10==1 \&\& n%100!=11 ? 1 : n\"/\"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n%10==1 \&\& n%100!=11 ? 1 : n%\"/
s/\"%10>=2 \&\& (n%100<10 || n%100>=20) ? 2 \: 3);\\n\"/\"10>=2 \&\& (n%100<10 || n%100>=20) ? 2 \: 3);\\n\"/
/\"Language: lt\\n\"/d
/\"Content-Transfer-Encoding: 8bit\\n\"/ a\
\"Language: lt\\n\"' "$po"
rm "$po"e
done