max_tries=5
try=1 # retrying until we get offered an update while [ "$try" -le "$max_tries" ]; do echo"Using $update_url" # retrying until AUS gives us any response at all
cached_download update.xml "${update_url}"
echo"Got this response:" cat update.xml # If the first line after <updates> is </updates> then we have an # empty snippet. Otherwise we're done if [ "$(grep -A1 '' update.xml | tail -1)" != "" ]; then
break; fi echo"Empty response, sleeping"
sleep 5
try=$((try+1)) done
echo; echo; # padding
update_line=$(grep -F " update.xml)
grep_rv=$? if [ 0 -ne $grep_rv ]; then echo"TEST-UNEXPECTED-FAIL: no found for $update_url"
return 1 fi
command=$(echo"$update_line" | sed -e 's/^.* -e 's:>.*$::' -e 's:\&:\&:g') eval"export $command"
# buildID and some other variables further down are gathered by eval'ing # the massaged `update.xml` file a bit further up. Because of this, shellcheck # cannot verify their existence, and gets grumpy. Ideally we would do this # differently, but it's not worth the trouble at the time of writing. # shellcheck disable=SC2154 if [ -n "$to_build_id" ] && [ "$buildID" != "$to_build_id" ]; then echo"TEST-UNEXPECTED-FAIL: expected buildID $to_build_id does not match actual $buildID"
return 1 fi
# shellcheck disable=SC2154 if [ -n "$to_display_version" ] && [ "$displayVersion" != "$to_display_version" ]; then echo"TEST-UNEXPECTED-FAIL: expected displayVersion $to_display_version does not match actual $displayVersion"
return 1 fi
# shellcheck disable=SC2154 if [ -n "$to_app_version" ] && [ "$appVersion" != "$to_app_version" ]; then echo"TEST-UNEXPECTED-FAIL: expected appVersion $to_app_version does not match actual $appVersion"
return 1 fi
mkdir -p update/ if [ -z "$only" ]; then
only="partial complete" fi for patch_type in $only do
line=$(grep -F "patch type=\"$patch_type" update.xml)
grep_rv=$?
if [ 0 -ne $grep_rv ]; then echo"TEST-UNEXPECTED-FAIL: no $patch_type update found for $update_url"
return 1 fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.