5 |
|
|
6 |
# Clean up tmp dir |
# Clean up tmp dir |
7 |
rm -rf /var/lib/pootle/tmp |
rm -rf /var/lib/pootle/tmp |
8 |
mkdir -p /var/lib/pootle/tmp/ /var/www/html/pootle/{patches,errors,anaconda} |
mkdir -p /var/lib/pootle/tmp/ /var/www/html/{patches,errors,anaconda} |
9 |
|
|
10 |
#========================================================== |
#========================================================== |
11 |
|
|
21 |
then |
then |
22 |
ls /var/lib/pootle/po/*/*/$pkg.po | cut -d/ --output-delimiter " " -f6,7 | while read ver lang |
ls /var/lib/pootle/po/*/*/$pkg.po | cut -d/ --output-delimiter " " -f6,7 | while read ver lang |
23 |
do |
do |
24 |
mkdir -p /var/www/html/pootle/anaconda/$ver/$lang/LC_MESSAGES |
mkdir -p /var/www/html/anaconda/$ver/$lang/LC_MESSAGES |
25 |
anacondagen $ver $lang > /var/www/html/pootle/anaconda/$ver/$lang/LC_MESSAGES/anaconda.mo |
anacondagen $ver $lang > /var/www/html/anaconda/$ver/$lang/LC_MESSAGES/anaconda.mo |
26 |
[ -s /var/www/html/pootle/anaconda/$ver/$lang/LC_MESSAGES/anaconda.mo ] || rm -rf /var/www/html/pootle/anaconda/$ver/$lang |
[ -s /var/www/html/anaconda/$ver/$lang/LC_MESSAGES/anaconda.mo ] || rm -rf /var/www/html/anaconda/$ver/$lang |
27 |
done |
done |
28 |
else |
else |
29 |
pkgs=$(ls -d /var/lib/pootle/cvs/*/smeserver-$pkg/*/*/root 2> /dev/null) |
pkgs=$(ls -d /var/lib/pootle/cvs/*/smeserver-$pkg/*/*/root 2> /dev/null) |
65 |
# Build diffs |
# Build diffs |
66 |
ls -d diff/*/* | sed 's@.update$@@' | cut -d/ --output-delimiter " " -f2,3 | while read ver pkg |
ls -d diff/*/* | sed 's@.update$@@' | cut -d/ --output-delimiter " " -f2,3 | while read ver pkg |
67 |
do |
do |
68 |
mkdir -p /var/www/html/pootle/patches/$ver |
mkdir -p /var/www/html/patches/$ver |
69 |
rm -f /var/www/html/pootle/patches/$ver/$(echo $pkg | sed 's/-[^-]\+$//')-*-locale-*.patch |
rm -f /var/www/html/patches/$ver/$(echo $pkg | sed 's/-[^-]\+$//')-*-locale-*.patch |
70 |
if [ -d "diff/$ver/$pkg.update/root" ] |
if [ -d "diff/$ver/$pkg.update/root" ] |
71 |
then |
then |
72 |
diff -ruN {/var/lib/pootle/cvs/*/*/$ver/$pkg,diff/$ver/$pkg.update}/root/etc/e-smith/locale \ |
diff -ruN {/var/lib/pootle/cvs/*/*/$ver/$pkg,diff/$ver/$pkg.update}/root/etc/e-smith/locale \ |
73 |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@;/^diff -ruN/d' \ |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/root/.*\)@\1 \2@;/^diff -ruN/d' \ |
74 |
>> /var/www/html/pootle/patches/$ver/$pkg-locale-$(date +%F).patch |
>> /var/www/html/patches/$ver/$pkg-locale-$(date +%F).patch |
75 |
fi |
fi |
76 |
if [ -d "diff/$ver/$pkg.update/po" ] |
if [ -d "diff/$ver/$pkg.update/po" ] |
77 |
then |
then |
78 |
diff -ruN {/var/lib/pootle/cvs/*/*/$ver/$pkg,diff/$ver/$pkg.update}/po \ |
diff -ruN {/var/lib/pootle/cvs/*/*/$ver/$pkg,diff/$ver/$pkg.update}/po \ |
79 |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
| sed 's@^\(---\|+++\) [^ ]\+/\([^/]\+/po/.*\)@\1 \2@;/^diff -ruN/d' \ |
80 |
>> /var/www/html/pootle/patches/$ver/$pkg-locale-$(date +%F).patch |
>> /var/www/html/patches/$ver/$pkg-locale-$(date +%F).patch |
81 |
fi |
fi |
82 |
done |
done |
83 |
|
|