summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-07-29 08:27:20 +0100
committerLeah Rowe <leah@libreboot.org>2023-07-29 08:27:20 +0100
commit4875eef116549104254459fc6e2a01143228e52f (patch)
tree23fa1d7c3ce6b97c89f49ff623adcb7a16ad44f4
parentcca93ca3f366af09b92c163e11cdfd3240c11adb (diff)
blobs/download: properly handle backup/main url
Immediately after the last revision, which was a hacky workaround to the problem, I realised the actual problem, and the real solution: In the switch block, check *backup* first. Then it breaks, continuing on the iteration. If it's variable for a main URL, it'll reliably go to the next check in the block, whereas if it's backup, it'll default to the first one in each case. This bug has been annoying the sh*t out of me for ages, and I've finally nailed it. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xresources/scripts/update/blobs/download24
1 files changed, 12 insertions, 12 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download
index 6067b48f..0efd92a7 100755
--- a/resources/scripts/update/blobs/download
+++ b/resources/scripts/update/blobs/download
@@ -108,14 +108,14 @@ scan_sources_config()
while read -r line ; do
case ${line} in
- EC_url*)
- set ${line}
- ec_url=http${2##*http}
- ;;
EC_url_bkup*)
set ${line}
ec_url_bkup=${2}
;;
+ EC_url*)
+ set ${line}
+ ec_url=${2}
+ ;;
EC_hash*)
set ${line}
ec_hash=${2}
@@ -124,26 +124,26 @@ scan_sources_config()
set ${line}
dl_hash=${2}
;;
- DL_url*)
- set ${line}
- dl_url=http${2##*http}
- ;;
DL_url_bkup*)
set ${line}
dl_url_bkup=${2}
;;
- E6400_VGA_DL_hash*)
+ DL_url*)
set ${line}
- e6400_vga_dl_hash=${2}
+ dl_url=${2}
;;
- E6400_VGA_DL_url*)
+ E6400_VGA_DL_hash*)
set ${line}
- e6400_vga_dl_url=http${2##*http}
+ e6400_vga_dl_hash=${2}
;;
E6400_VGA_DL_url_bkup*)
set ${line}
e6400_vga_dl_url_bkup=${2}
;;
+ E6400_VGA_DL_url*)
+ set ${line}
+ e6400_vga_dl_url=${2}
+ ;;
E6400_VGA_offset*)
set ${line}
e6400_vga_offset=${2}