diff --git a/download_latest_ota_build.sh b/download_latest_ota_build.sh index 88fc0ef..9e6c2f1 100644 --- a/download_latest_ota_build.sh +++ b/download_latest_ota_build.sh @@ -14,7 +14,7 @@ print_message "Downloading OTA builds for the following devices: $(IFS=, ; echo for device_name in "$@"; do # Allow multiple arguments # last_build_url=$(curl -b "devsite_wall_acks=nexus-ota-tos" -Ls 'https://developers.google.com/android/ota?partial=1' | grep -Eo "\"(\S+${device_name}\S+)?zip" | tail -1 | tr -d \") # Could be unstable but fix for stable OTA no carrier. - last_build_url=$(curl -b "devsite_wall_acks=nexus-ota-tos" -Ls 'https://developers.google.com/android/ota?partial=1' | grep -oP '\d+(\.\d+)+ \([^)]+\).*?https://\S+${device_name}\S+zip' | sed -n 's/\\u003c\/td\\u003e\\n \\u003ctd\\u003e\\u003ca href=\\"/ /p' | awk '!/AT|Verizon|T-Mobile|US-Emerging|carrier|KDDI/' | tail -1 | grep -Eo "(https\S+)") + last_build_url=$(curl -b "devsite_wall_acks=nexus-ota-tos" -Ls 'https://developers.google.com/android/ota?partial=1' | grep -oP "\d+(\.\d+)+ \([^)]+\).*?https://\S+${device_name}\S+zip" | sed -n 's/\\u003c\/td\\u003e\\n \\u003ctd\\u003e\\u003ca href=\\"/ /p' | awk '!/AT|Verizon|T-Mobile|US-Emerging|carrier|KDDI/' | tail -1 | grep -Eo "(https\S+)") print_message "Downloading OTA build for ${device_name^} (\"$last_build_url\")..." debug wget --tries=inf --show-progress -q "$last_build_url" done