testing/release/l10n/verify_l10n.sh

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rwxr-xr-x

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 #!/bin/bash
     2 # This Source Code Form is subject to the terms of the Mozilla Public
     3 # License, v. 2.0. If a copy of the MPL was not distributed with this
     4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     7 . ../common/unpack.sh
     9 release=$1
    11 if [ -z "$release" ]
    12 then
    13   echo "Syntax: $0 <release_dir>"
    14   exit 1
    15 fi
    17 for platform in linux-i686 win32 mac
    18 do
    19   rm -rf source/*
    20   # unpack_build platform dir_name pkg_file
    21   unpack_build $platform source $release/*.en-US.${platform}.* en-US
    22   # check for read-only files
    23   find "./source" -not -perm -u=w -exec echo "FAIL read-only file" {} \;
    25   for package in `find $release -maxdepth 1 -iname "*.$platform.*" | \
    26                   grep -v 'en-US'`
    27   do
    28     # strip the directory portion
    29     package=`basename $package`
    30     # this cannot be named $locale, because unpack_build will overwrite it
    31     l=`echo $package | sed -e "s/\.${platform}.*//" -e 's/.*\.//'`
    32     rm -rf target/*
    33     unpack_build $platform target $release/$package $l
    34     # check for read-only files
    35     find "./target" -not -perm -u=w -exec echo "FAIL read-only file" {} \;
    36     mkdir -p $release/diffs
    37     diff -r source target > $release/diffs/$platform.$l.diff
    38   done
    39 done
    41 exit 0

mercurial