diff options
author | Riku Viitanen <riku.viitanen@protonmail.com> | 2023-06-17 18:13:04 +0300 |
---|---|---|
committer | Riku Viitanen <riku.viitanen@protonmail.com> | 2023-06-17 18:15:55 +0300 |
commit | 0f4f32cfc2bd89831eb9fd7623b850d88881e596 (patch) | |
tree | 5a7faeaea3eea394f374da6b415b05c907d3e175 /resources/scripts | |
parent | 25474414cfdfd16bf590a6578336a9e463870e4f (diff) |
Cache downloads based on checksum
Since many boards use the same ME firmware, we could save
everyone's bandwidth and time by caching the update files.
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Diffstat (limited to 'resources/scripts')
-rwxr-xr-x | resources/scripts/update/blobs/download | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download index 7c775ea5..eebdf0a3 100755 --- a/resources/scripts/update/blobs/download +++ b/resources/scripts/update/blobs/download @@ -11,6 +11,7 @@ ec_hash="" dl_hash="" dl_url="" dl_url_bkup="" +dl_path="" e6400_vga_dl_hash="" e6400_vga_dl_url="" e6400_vga_dl_url_bkup="" @@ -21,7 +22,6 @@ cbdir="coreboot/default" cbcfgsdir="resources/coreboot" boarddir="" blobdir="blobs" -dl_path="${blobdir}/vendorupdate" appdir="${blobdir}/app" _7ztest="a" mecleaner="$(pwd)/me_cleaner/me_cleaner.py" @@ -431,6 +431,9 @@ fetch_update() return 1 fi + dl_path=${blobdir}/cache/${dlsum} + mkdir -p ${blobdir}/cache + vendor_checksum ${dlsum} || \ wget ${dl} -O ${dl_path} || wget ${dl_bkup} -O ${dl_path} |