2009-11-12 20:58:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-10-22 05:22:01 +00:00
|
|
|
# Look for .po files modified later than .mo, and regenerate .mo file
|
|
|
|
# Then commit and push changes.
|
|
|
|
|
2015-03-24 19:09:23 +00:00
|
|
|
projname=boinc
|
2015-03-24 19:11:15 +00:00
|
|
|
projdir=/home/boincadm/rwalton/$projname/locale
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2009-11-12 22:19:36 +00:00
|
|
|
cd $projdir
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2009-11-12 22:19:36 +00:00
|
|
|
for file in `find -name 'BOINC-Manager.po'` ; do
|
2009-11-12 20:58:03 +00:00
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
2015-03-24 19:25:10 +00:00
|
|
|
template_name=BOINC-Manager
|
|
|
|
|
|
|
|
cd $projdir/${locale}
|
2009-11-12 22:19:36 +00:00
|
|
|
|
2015-03-24 19:33:54 +00:00
|
|
|
if test ${template_name}.po -nt ${template_name}.mo.flag
|
2010-02-18 20:57:13 +00:00
|
|
|
then
|
2009-11-12 22:19:36 +00:00
|
|
|
|
2010-09-20 20:40:22 +00:00
|
|
|
# Compile the PO file into an MO file.
|
2015-03-24 19:14:31 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
|
|
|
|
|
|
|
# Add the updated file to git
|
|
|
|
git add ${template_name}.mo
|
2009-11-12 22:19:36 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
2010-02-18 20:57:13 +00:00
|
|
|
touch ${template_name}.po
|
2015-03-24 19:33:54 +00:00
|
|
|
touch ${template_name}.mo.flag
|
2009-11-12 22:19:36 +00:00
|
|
|
|
|
|
|
fi
|
2010-02-18 20:57:13 +00:00
|
|
|
done
|
2009-11-12 21:48:04 +00:00
|
|
|
|
2010-02-18 20:57:13 +00:00
|
|
|
|
2015-03-24 19:25:10 +00:00
|
|
|
cd $projdir
|
|
|
|
|
2010-07-13 20:02:33 +00:00
|
|
|
for file in `find -name 'BOINC-Client.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
2015-03-24 19:25:10 +00:00
|
|
|
template_name=BOINC-Client
|
|
|
|
|
|
|
|
cd $projdir/${locale}
|
2010-07-13 20:02:33 +00:00
|
|
|
|
2015-03-24 19:33:54 +00:00
|
|
|
if test ${template_name}.po -nt ${template_name}.mo.flag
|
2010-07-13 20:02:33 +00:00
|
|
|
then
|
|
|
|
|
2010-09-20 20:40:22 +00:00
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2015-03-24 19:14:31 +00:00
|
|
|
|
|
|
|
# Add the updated file to git
|
|
|
|
git add ${template_name}.mo
|
2010-07-13 20:02:33 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
2015-03-24 19:33:54 +00:00
|
|
|
touch ${template_name}.mo.flag
|
2010-07-13 20:02:33 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2015-03-24 19:25:10 +00:00
|
|
|
cd $projdir
|
|
|
|
|
2011-12-16 00:55:04 +00:00
|
|
|
for file in `find -name 'BOINC-Web.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
2015-03-24 19:25:10 +00:00
|
|
|
template_name=BOINC-Web
|
|
|
|
|
|
|
|
cd $projdir/${locale}
|
2011-12-16 00:55:04 +00:00
|
|
|
|
2015-03-24 19:33:54 +00:00
|
|
|
if test ${template_name}.po -nt ${template_name}.mo.flag
|
2011-12-16 00:55:04 +00:00
|
|
|
then
|
|
|
|
|
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2015-03-24 19:14:31 +00:00
|
|
|
|
|
|
|
# Add the updated file to git
|
|
|
|
git add ${template_name}.mo
|
2011-12-16 00:55:04 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
2015-03-24 19:33:54 +00:00
|
|
|
touch ${template_name}.mo.flag
|
2011-12-16 00:55:04 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2015-03-24 19:25:10 +00:00
|
|
|
cd $projdir
|
|
|
|
|
2013-06-05 20:49:02 +00:00
|
|
|
for file in `find -name 'BOINC-Setup.po'` ; do
|
|
|
|
dir=`dirname $file`
|
|
|
|
locale=`basename $dir`
|
2015-03-24 19:25:10 +00:00
|
|
|
template_name=BOINC-Setup
|
|
|
|
|
|
|
|
cd $projdir/${locale}
|
2013-06-05 20:49:02 +00:00
|
|
|
|
2015-03-24 19:33:54 +00:00
|
|
|
if test ${template_name}.po -nt ${template_name}.mo.flag
|
2013-06-05 20:49:02 +00:00
|
|
|
then
|
|
|
|
|
|
|
|
# Compile the PO file into an MO file.
|
2013-06-20 02:47:25 +00:00
|
|
|
pocompile ${template_name}.po ${template_name}.mo
|
2015-03-24 19:14:31 +00:00
|
|
|
|
|
|
|
# Add the updated file to git
|
|
|
|
git add ${template_name}.mo
|
2013-06-05 20:49:02 +00:00
|
|
|
|
|
|
|
# Touch each file to adjust timestamps
|
|
|
|
touch ${template_name}.po
|
2015-03-24 19:33:54 +00:00
|
|
|
touch ${template_name}.mo.flag
|
2013-06-05 20:49:02 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2013-09-06 19:35:12 +00:00
|
|
|
git commit -a -m "locale: Update compiled localization files"
|
|
|
|
git push origin
|
2013-06-05 20:49:02 +00:00
|
|
|
|
2009-11-12 20:58:03 +00:00
|
|
|
exit 0
|