diff -r 4b419fce88dc -r 8220ea23b47d MozillaFirefox/create-tar.sh --- a/MozillaFirefox/create-tar.sh Fri Feb 09 13:28:07 2018 +0100 +++ b/MozillaFirefox/create-tar.sh Fri Feb 09 16:30:49 2018 +0100 @@ -10,6 +10,11 @@ RELEASE_TAG="73ef186ad51ac2c4fc27b1f149fcc94355fe7dc6" VERSION="58.99" +# check required tools +test -x /usr/bin/hg || ( echo "hg missing: execute zypper in mercurial"; exit 5 ) +test -x /usr/bin/jq || ( echo "jq missing: execute zypper in jq"; exit 5 ) + + # mozilla if [ -d mozilla ]; then pushd mozilla @@ -54,19 +59,19 @@ # l10n echo "fetching locales..." test ! -d l10n && mkdir l10n -for locale in $(awk '{ print $1; }' l10n_changesets.txt); do - case $locale in - ja-JP-mac|en-US) - ;; - *) - echo "reading changeset information for $locale" - _changeset=$(grep ^$locale l10n_changesets.txt | awk '{ print $2; }') - echo "fetching $locale changeset $_changeset ..." - hg clone http://hg.mozilla.org/l10n-central/$locale l10n/$locale - [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $_changeset - ;; - esac -done +jq -r 'to_entries[]| "\(.key) \(.value|.revision)"' mozilla/browser/locales/l10n-changesets.json | \ + while read locale changeset ; do + case $locale in + ja-JP-mac|en-US) + ;; + *) + echo "reading changeset information for $locale" + echo "fetching $locale changeset $changeset ..." + hg clone http://hg.mozilla.org/l10n-central/$locale l10n/$locale + [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $changeset + ;; + esac + done echo "creating l10n archive..." tar $compression -cf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n