Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 47747c47c9e927a2d9fafac0ed18622d > files > 6

thunderbird-45.8.0-1.mga5.src.rpm

#!/bin/bash
# This checks out and builds the language sources.  The lightning source needs to already be unpacked
# it should be called from withing the SOURCES folder after e.g. bm -lp was run once
#lver=`awk '/^%global *lightning_ver/ { print $3; exit }' thunderbird.spec`
tbver=`awk '/^Version:/ { print $2; exit }' ../SPECS/thunderbird.spec`
#tag=CALENDAR_${lver//./_}_RELEASE
tag=THUNDERBIRD_${tbver//./_}_RELEASE
branch=`awk '/^%define *release_dir/ { print $3; exit }' ../SPECS/thunderbird.spec`
locales=$PWD/../BUILD/thunderbird-${tbver}/${branch}/calendar/locales/shipped-locales
#locales=$PWD/shipped-locales
if [ ! -f $locales ]
then
  echo "ERROR: missing $locales definitions, try bm -lp first"
  exit 1
fi
[ ! -d l10n ] && mkdir l10n
cd l10n
for lang in $(<$locales)
do
  if [ -d $lang ]
  then
    pushd $lang
    hg pull
    hg update $tag
    popd
  else
    hg clone -u $tag http://hg.mozilla.org/releases/l10n/mozilla-release/$lang
  fi
done

# Tar up, minus the mercurial files
cd ..
rm -f l10n-${lver}.tar.xz
tar caf l10n-lightning-${tbver}.tar.xz --exclude='.hg*'  l10n