testing/release/l10n/verify_l10n.sh

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial