Skip to content

Commit 50fe059

Browse files
authored
Update for new Sierra URL scheme.
1 parent 7d97c1c commit 50fe059

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autoflash-7455.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ sleep 1
305305
function download_modem_firmware() {
306306
# Find latest 7455 firmware and download it
307307
if [[ -z $SWI9X30C_ZIP ]]; then
308-
SWI9X30C_ZIP=$(curl https://source.sierrawireless.com/resources/airprime/minicard/74xx/airprime-em_mc74xx-approved-fw-packages/ 2> /dev/null | grep PTCRB -B1 | sed 's/,-d-,/./g' | grep -iEo '7455/swi9x30c[_0-9.]+_generic_[_0-9.]+' | cut -c 6- | tail -n1)
308+
SWI9X30C_URL=$(curl https://source.sierrawireless.com/resources/airprime/minicard/74xx/airprime-em_mc74xx-approved-fw-packages/ 2> /dev/null | grep PTCRB -B1 | sed 's/,-d-,/./g' | grep -iPo 'href="\K.+/swi9x30c[_0-9.]+_generic_[_0-9.]+' | tail -n1)
309+
SWI9X30C_ZIP=${SWI9X30C_URL##*/}
309310
SWI9X30C_ZIP="${SWI9X30C_ZIP^^}"'zip'
310311
fi
311-
SWI9X30C_URL='https://source.sierrawireless.com/~/media/support_downloads/airprime/74xx/fw/7455/'"$SWI9X30C_ZIP"
312-
313-
SWI9X30C_LENGTH=$(curl -sI "$SWI9X30C_URL" | grep -i Content-Length | grep -Eo '[0-9]+')
312+
SWI9X30C_URL="https://source.sierrawireless.com${SWI9X30C_URL}zip"
313+
SWI9X30C_LENGTH=$(curl -sI "$SWI9X30C_URL" | grep -iPo '^Content-Length[^0-9]+\K[0-9]+')
314314

315315
# If remote file size is less than 40MiB, something went wrong, exit.
316316
if [[ $SWI9X30C_LENGTH -lt 40000000 ]]; then

0 commit comments

Comments
 (0)