michael@0: #!/bin/bash michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: michael@0: . ../common/unpack.sh michael@0: michael@0: release=$1 michael@0: michael@0: if [ -z "$release" ] michael@0: then michael@0: echo "Syntax: $0 " michael@0: exit 1 michael@0: fi michael@0: michael@0: for platform in linux-i686 win32 mac michael@0: do michael@0: rm -rf source/* michael@0: # unpack_build platform dir_name pkg_file michael@0: unpack_build $platform source $release/*.en-US.${platform}.* en-US michael@0: # check for read-only files michael@0: find "./source" -not -perm -u=w -exec echo "FAIL read-only file" {} \; michael@0: michael@0: for package in `find $release -maxdepth 1 -iname "*.$platform.*" | \ michael@0: grep -v 'en-US'` michael@0: do michael@0: # strip the directory portion michael@0: package=`basename $package` michael@0: # this cannot be named $locale, because unpack_build will overwrite it michael@0: l=`echo $package | sed -e "s/\.${platform}.*//" -e 's/.*\.//'` michael@0: rm -rf target/* michael@0: unpack_build $platform target $release/$package $l michael@0: # check for read-only files michael@0: find "./target" -not -perm -u=w -exec echo "FAIL read-only file" {} \; michael@0: mkdir -p $release/diffs michael@0: diff -r source target > $release/diffs/$platform.$l.diff michael@0: done michael@0: done michael@0: michael@0: exit 0