Skip to content

Commit

Permalink
Update download_latest_ota_build.sh
Browse files Browse the repository at this point in the history
Fix bracket variable device_name
  • Loading branch information
0x11DFE authored Dec 9, 2023
1 parent 5c95211 commit e207c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion download_latest_ota_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e207c1f

Please sign in to comment.