summaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-07-29 08:09:57 +0100
committerLeah Rowe <leah@libreboot.org>2023-07-29 08:09:57 +0100
commit3aeefaa75d026a6d4978ab83db24becca859510c (patch)
tree1b29e0ace52300079e3769d897ea7928c04993b1 /resources/scripts
parent5e83d2bc8ffa6f0c1dc18f82b159090901413271 (diff)
blobs/download: set common user agent string
Make it look like a normal web browser, downloading files. Some HTTP servers might block Wget unless this is done. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/update/blobs/download5
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download
index 041a2362..af4e7e7a 100755
--- a/resources/scripts/update/blobs/download
+++ b/resources/scripts/update/blobs/download
@@ -5,6 +5,8 @@
# SPDX-FileCopyrightText: 2023 Leah Rowe <info@minifree.org>
# SPDX-License-Identifier: GPL-3.0-only
+agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101"
+
ec_url=""
ec_url_bkup=""
ec_hash=""
@@ -447,7 +449,8 @@ fetch_update()
mkdir -p ${blobdir}/cache
vendor_checksum ${dlsum} || \
- wget ${dl} -O ${dl_path} || wget ${dl_bkup} -O ${dl_path}
+ wget -U "${agent}" ${dl} -O ${dl_path} \
+ || wget -U "${agent}" ${dl_bkup} -O ${dl_path}
vendor_checksum ${dlsum} || fail \
"Cannot guarantee intergity of vendor update for: ${board}"