work on win32/mac, remove /dev/stderr tricks, 7z must be on the path (no assumptions). b=371305, r=robcee

git-svn-id: svn://10.0.0.236/trunk@221251 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rhelmer%mozilla.com
2007-03-02 23:53:55 +00:00
parent 67f909b84d
commit fdbe9bb400
4 changed files with 17 additions and 13 deletions

View File

@@ -10,24 +10,27 @@ check_updates () {
unpack_build $update_platform source "$source_package"
if [ "$?" != "0" ]; then
echo "FAILED: cannot unpack_build $update_platform source $source_package" |tee /dev/stderr
echo "FAILED: cannot unpack_build $update_platform source $source_package"
return 1
fi
unpack_build $update_platform target "$target_package"
if [ "$?" != "0" ]; then
echo "FAILED: cannot unpack_build $update_platform target $target_package" |tee /dev/stderr
echo "FAILED: cannot unpack_build $update_platform target $target_package"
return 1
fi
case $update_platform in
Darwin_ppc-gcc | Darwin_Universal-gcc3)
platform_dirname="*.app"
updater="Contents/MacOS/updater.app/Contents/MacOS/updater"
;;
WINNT_x86-msvc)
platform_dirname="bin"
updater="updater.exe"
;;
Linux_x86-gcc | Linux_x86-gcc3)
platform_dirname=`echo $product | tr '[A-Z]' '[a-z]'`
updater="updater"
;;
esac
@@ -36,10 +39,11 @@ check_updates () {
if [ -d source/$platform_dirname ]; then
cd source/$platform_dirname;
$HOME/bin/updater ../../update 0
cp $updater ../../update
../../update/updater ../../update 0
cd ../..
else
echo "FAIL: no dir in source/$platform_dirname" |tee /dev/stderr
echo "FAIL: no dir in source/$platform_dirname"
return 1
fi

View File

@@ -22,7 +22,7 @@ download_builds() {
if [ -f "$source_file" ]; then rm "$source_file"; fi
wget -nv $PARAMS "$url" 2>&1
if [ $? != 0 ]; then
echo "FAIL: Could not download source $source_file from $url" |tee /dev/stderr
echo "FAIL: Could not download source $source_file from $url"
echo "skipping.."
cd ../
continue

View File

@@ -16,7 +16,7 @@ download_mars () {
grep_rv=$?
if [ 0 -ne $grep_rv ]; then
echo "FAIL: no $patch_type update found for $update_url" | tee /dev/stderr
echo "FAIL: no $patch_type update found for $update_url"
return 1
fi
@@ -39,16 +39,16 @@ download_mars () {
actual_hash=`openssl dgst -$hashFunction update/$patch_type.mar | sed -e 's/^.*= //'`
if [ $actual_size != $size ]; then
echo "FAIL: $patch_type from $update_url wrong size" |tee /dev/stderr
echo "FAIL: update.xml size: $size" |tee /dev/stderr
echo "FAIL: actual size: $actual_size" |tee /dev/stderr
echo "FAIL: $patch_type from $update_url wrong size"
echo "FAIL: update.xml size: $size"
echo "FAIL: actual size: $actual_size"
return 1
fi
if [ $actual_hash != $hashValue ]; then
echo "FAIL: $patch_type from $update_url wrong hash" |tee /dev/stderr
echo "FAIL: update.xml hash: $hashValue" |tee /dev/stderr
echo "FAIL: actual hash: $actual_hash" |tee /dev/stderr
echo "FAIL: $patch_type from $update_url wrong hash"
echo "FAIL: update.xml hash: $hashValue"
echo "FAIL: actual hash: $actual_hash"
return 1
fi

View File

@@ -17,7 +17,7 @@ unpack_build () {
cd $dir_name
;;
win32|WINNT_x86-msvc)
/usr/local/bin/7za x ../"$pkg_file" > /dev/null
7z x ../"$pkg_file" > /dev/null
if [ -d localized ]
then
mkdir bin/