38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
source "`dirname $0`/ths-variables"
|
|
|
|
function jobidfromstring()
|
|
{
|
|
local STRING;
|
|
local RET;
|
|
|
|
STRING=$1;
|
|
RET="$(echo $STRING | sed 's/^[^0-9]*//' | sed 's/[^0-9].*$//')"
|
|
|
|
echo $RET;
|
|
}
|
|
|
|
echo -e $BLUE"Running poupdate..."$ENDCOLOR
|
|
./poupdate -NS --silent trunk stable pot-stable &
|
|
LASTJOB=`jobidfromstring $(jobs %%)`
|
|
JOBLIST="$LASTJOB"
|
|
./poupdate -NS --silent doc-trunk doc-stable doc-pot-stable &
|
|
LASTJOB=`jobidfromstring $(jobs %%)`
|
|
JOBLIST="$JOBLIST $LASTJOB"
|
|
|
|
for JOB in $JOBLIST ; do
|
|
wait %$JOB
|
|
done
|
|
|
|
echo -e $BLUE"Running sed script..."$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
|