MozillaFirefox/create-tar.sh
author Wolfgang Rosenauer <wr@rosenauer.org>
Sun, 16 Mar 2014 18:25:23 +0100
changeset 711 012a5adf5c74
parent 707 bfa2e0576454
child 716 cef565f1c325
permissions -rwxr-xr-x
moved to mozilla-release (28.0build2)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     1
#!/bin/bash
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     2
711
012a5adf5c74 moved to mozilla-release (28.0build2)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 707
diff changeset
     3
CHANNEL="release"
340
aabcc7895695 update to version 8.0b1 (just merged stuff; build might still fail)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 337
diff changeset
     4
BRANCH="releases/mozilla-$CHANNEL"
711
012a5adf5c74 moved to mozilla-release (28.0build2)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 707
diff changeset
     5
RELEASE_TAG="FIREFOX_28_0_RELEASE"
012a5adf5c74 moved to mozilla-release (28.0build2)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 707
diff changeset
     6
VERSION="28.0"
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     7
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     8
# mozilla
646
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
     9
if [ -d mozilla ]; then
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    10
  pushd mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    11
  _repourl=$(hg paths)
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    12
  case "$_repourl" in
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    13
    *$BRANCH*)
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    14
      echo "updating previous tree"
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    15
      hg pull
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    16
      popd
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    17
      ;;
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    18
    * )
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    19
      echo "removing obsolete tree"
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    20
      popd
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    21
      rm -rf mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    22
      ;;
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    23
  esac
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    24
fi
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    25
if [ ! -d mozilla ]; then
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    26
  echo "cloning new $BRANCH..."
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    27
  hg clone http://hg.mozilla.org/$BRANCH mozilla
a3eaf3bb0cc9 try to use an earlier clone in case it's available
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 645
diff changeset
    28
fi
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    29
pushd mozilla
659
fa96cf6ffd14 Aurora 24 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 653
diff changeset
    30
hg update --check
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    31
[ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG
279
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    32
# get repo and source stamp
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    33
echo -n "REV=" > ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    34
hg -R . parent --template="{node|short}\n" >> ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    35
echo -n "REPO=" >> ../source-stamp.txt
eb9e33036fb4 update to 5.0b6
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 277
diff changeset
    36
hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    37
popd
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    38
echo "creating archive..."
699
f810fbe5fece update to 27.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 696
diff changeset
    39
tar cJf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    40
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    41
# l10n
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    42
echo "fetching locales..."
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    43
test ! -d l10n && mkdir l10n
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    44
for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
  case $locale in
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
    ja-JP-mac|en-US)
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
      ;;
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    48
    *)
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    49
      echo "fetching $locale ..."
340
aabcc7895695 update to version 8.0b1 (just merged stuff; build might still fail)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 337
diff changeset
    50
      hg clone http://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$locale l10n/$locale
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    51
      [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    52
      ;;
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    53
  esac
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    54
done
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    55
echo "creating l10n archive..."
699
f810fbe5fece update to 27.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 696
diff changeset
    56
tar cJf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    57
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
# compare-locales
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 408
diff changeset
    59
echo "creating compare-locales"
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
hg clone http://hg.mozilla.org/build/compare-locales
699
f810fbe5fece update to 27.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 696
diff changeset
    61
tar cJf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
262
b680975515e0 probably last working Firefox-on-xulrunner build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    62