|
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/. |
|
5 |
|
6 |
|
7 . ../common/unpack.sh |
|
8 |
|
9 release=$1 |
|
10 |
|
11 if [ -z "$release" ] |
|
12 then |
|
13 echo "Syntax: $0 <release_dir>" |
|
14 exit 1 |
|
15 fi |
|
16 |
|
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" {} \; |
|
24 |
|
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 |
|
40 |
|
41 exit 0 |