From 4875eef116549104254459fc6e2a01143228e52f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 29 Jul 2023 08:27:20 +0100 Subject: 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 --- resources/scripts/update/blobs/download | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'resources') 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} -- cgit v1.2.1