add support for HEAD-fetch-only b=346013 r=davel
git-svn-id: svn://10.0.0.236/trunk@212355 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
download_mars () {
|
||||
update_url="$1"
|
||||
only="$2"
|
||||
test_only="$3"
|
||||
|
||||
echo "Using $update_url"
|
||||
curl -sk $update_url > update.xml
|
||||
@@ -22,7 +23,13 @@ download_mars () {
|
||||
command=`echo $line | sed -e 's/^.*<patch //' -e 's:/>.*$::' -e 's:\&:\&:g'`
|
||||
eval "export $command"
|
||||
|
||||
wget -nv -O update/$patch_type.mar $URL 2>&1
|
||||
if [ "$test_only" == "1" ]
|
||||
then
|
||||
curl -sIL $URL
|
||||
return
|
||||
else
|
||||
wget -nv -O update/$patch_type.mar $URL 2>&1
|
||||
fi
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "Could not download $patch_type!"
|
||||
echo "from: $URL"
|
||||
|
||||
@@ -8,7 +8,63 @@
|
||||
|
||||
product="Firefox"
|
||||
channel="release"
|
||||
latest="1.5.0.6"
|
||||
latest="1.5.0.7"
|
||||
|
||||
runmode=0
|
||||
UPDATE_ONLY=1
|
||||
TEST_ONLY=2
|
||||
MARS_ONLY=3
|
||||
COMPLETE=4
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: verify.sh [OPTION]"
|
||||
echo " -u, --update-only only download update.xml"
|
||||
echo " -t, --test-only only test that MARs exist"
|
||||
echo " -m, --mars-only only test MARs"
|
||||
echo " -c, --complete complete upgrade test"
|
||||
}
|
||||
|
||||
if [ -z "$*" ]
|
||||
then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pass_arg_count=0
|
||||
while [ "$#" -gt "$pass_arg_count" ]
|
||||
do
|
||||
case "$1" in
|
||||
-u | --update-only)
|
||||
runmode=$UPDATE_ONLY
|
||||
shift
|
||||
;;
|
||||
-t | --test-only)
|
||||
runmode=$TEST_ONLY
|
||||
shift
|
||||
;;
|
||||
-m | --mars-only)
|
||||
runmode=$MARS_ONLY
|
||||
shift
|
||||
;;
|
||||
-c | --complete)
|
||||
runmode=$COMPLETE
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
# Move the unrecognized arg to the end of the list
|
||||
arg="$1"
|
||||
shift
|
||||
set -- "$@" "$arg"
|
||||
pass_arg_count=`expr $pass_arg_count + 1`
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$runmode" == "0" ]
|
||||
then
|
||||
usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while read entry
|
||||
do
|
||||
@@ -22,23 +78,42 @@ do
|
||||
do
|
||||
for patch_type in partial complete
|
||||
do
|
||||
download_mars "https://aus2.mozilla.org/update/1/$product/$release/$build_id/$platform/$locale/$channel/update.xml" $patch_type
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: download_mars returned non-zero exit code: $err" |tee /dev/stderr
|
||||
continue
|
||||
if [ "$runmode" == "$MARS_ONLY" ] || [ "$runmode" == "$COMPLETE" ] ||
|
||||
[ "$runmode" == "$TEST_ONLY" ]
|
||||
then
|
||||
if [ "$runmode" == "$TEST_ONLY" ]
|
||||
then
|
||||
download_mars "https://aus2.mozilla.org/update/1/$product/$release/$build_id/$platform/$locale/$channel/update.xml" $patch_type 1
|
||||
err=$?
|
||||
else
|
||||
download_mars "https://aus2.mozilla.org/update/1/$product/$release/$build_id/$platform/$locale/$channel/update.xml" $patch_type
|
||||
err=$?
|
||||
fi
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: download_mars returned non-zero exit code: $err" |tee /dev/stderr
|
||||
continue
|
||||
fi
|
||||
else
|
||||
update_path="$product/$release/$build_id/$platform/$locale/$channel"
|
||||
mkdir -p updates/$update_path/complete
|
||||
mkdir -p updates/$update_path/partial
|
||||
curl -ks "https://aus2.mozilla.org/update/1/$update_path/update.xml" $patch_type > updates/$update_path/$patch_type/update.xml
|
||||
|
||||
fi
|
||||
download_builds
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: download_builds returned non-zero exit code: $err" |tee /dev/stderr
|
||||
continue
|
||||
fi
|
||||
check_updates "$source_platform" "downloads/$source_file" "downloads/$target_file"
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: check_update returned non-zero exit code for $source_platform downloads/$source_file vs. downloads/$target_file: $err" |tee /dev/stderr
|
||||
continue
|
||||
if [ "$runmode" == "$COMPLETE" ]
|
||||
then
|
||||
download_builds
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: download_builds returned non-zero exit code: $err" |tee /dev/stderr
|
||||
continue
|
||||
fi
|
||||
check_updates "$source_platform" "downloads/$source_file" "downloads/$target_file"
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
echo "FAIL: check_update returned non-zero exit code for $source_platform downloads/$source_file vs. downloads/$target_file: $err" |tee /dev/stderr
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user