e02199
#!/bin/bash
e02199
# This checks out and builds the language sources.  The lightning source needs
e02199
# to already be unpacked
e02199
#lver=`awk '/^%global *lightning_ver/ { print $3; exit }' thunderbird.spec`
e02199
tbver=`awk '/^Version:/ { print $2; exit }' thunderbird.spec`
e02199
#tag=CALENDAR_${lver//./_}_RELEASE
e02199
tag=THUNDERBIRD_${tbver//./_}_RELEASE
e02199
branch=`awk '/^%define *tarballdir/ { print $3; exit }' thunderbird.spec`
e02199
locales=$PWD/thunderbird-${tbver}/${branch}/calendar/locales/shipped-locales
e02199
#locales=$PWD/shipped-locales
e02199
if [ ! -f $locales ]
e02199
then
e02199
  echo "ERROR: missing $locales, try fedpkg prep first"
e02199
  exit 1
e02199
fi
e02199
[ ! -d l10n ] && mkdir l10n
e02199
cd l10n
e02199
for lang in $(<$locales)
e02199
do
e02199
  if [ -d $lang ]
e02199
  then
e02199
    pushd $lang
e02199
    hg pull
e02199
    hg update $tag
e02199
    popd
e02199
  else
e02199
    hg clone -u $tag http://hg.mozilla.org/releases/l10n/mozilla-release/$lang
e02199
  fi
e02199
done
e02199
e02199
# Tar up, minus the mercurial files
e02199
cd ..
e02199
rm -f l10n-${lver}.tar.bz2
e02199
tar cjf l10n-lightning-${tbver}.tar.bz2 --exclude='.hg*'  l10n