xulrunner/create-tar.sh
changeset 941 ff9e20146e8b
parent 936 096e59808e91
parent 940 f63a4ac0fe06
child 942 66115255ad6f
equal deleted inserted replaced
936:096e59808e91 941:ff9e20146e8b
     1 #!/bin/bash
       
     2 
       
     3 CHANNEL="esr38"
       
     4 BRANCH="releases/mozilla-$CHANNEL"
       
     5 RELEASE_TAG="FIREFOX_38_2_0esr_RELEASE"
       
     6 VERSION="38.2.0"
       
     7 
       
     8 # mozilla
       
     9 if [ -d mozilla ]; then
       
    10   pushd mozilla
       
    11   _repourl=$(hg paths)
       
    12   case "$_repourl" in
       
    13     *$BRANCH*)
       
    14       echo "updating previous tree"
       
    15       hg pull
       
    16       popd
       
    17       ;;
       
    18     * )
       
    19       echo "removing obsolete tree"
       
    20       popd
       
    21       rm -rf mozilla
       
    22       ;;
       
    23   esac
       
    24 fi
       
    25 if [ ! -d mozilla ]; then
       
    26   echo "cloning new $BRANCH..."
       
    27   hg clone http://hg.mozilla.org/$BRANCH mozilla
       
    28 fi
       
    29 pushd mozilla
       
    30 hg update --check
       
    31 [ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG
       
    32 # get repo and source stamp
       
    33 echo -n "REV=" > ../source-stamp.txt
       
    34 hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt
       
    35 echo -n "REPO=" >> ../source-stamp.txt
       
    36 hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt
       
    37 popd
       
    38 echo "creating archive..."
       
    39 tar cJf xulrunner-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
       
    40 
       
    41 # l10n
       
    42 echo "fetching locales..."
       
    43 test ! -d l10n && mkdir l10n
       
    44 for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do
       
    45   case $locale in
       
    46     ja-JP-mac|en-US)
       
    47       ;;
       
    48     *)
       
    49       echo "fetching $locale ..."
       
    50       hg clone http://hg.mozilla.org/releases/l10n/mozilla-release/$locale l10n/$locale
       
    51       [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG
       
    52       ;;
       
    53   esac
       
    54 done
       
    55 echo "creating l10n archive..."
       
    56 tar cJf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
       
    57 
       
    58 # compare-locales
       
    59 echo "creating compare-locales"
       
    60 hg clone http://hg.mozilla.org/build/compare-locales
       
    61 tar cJf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
       
    62