diff options
author | Leah Rowe <leah@libreboot.org> | 2024-07-19 00:31:57 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-07-19 00:37:11 +0100 |
commit | 2b50b3ea9a11b6ba2751ebb4237f0ea7288e5c81 (patch) | |
tree | 78272735f8a19e23c84ab720980d54d16f6244b0 /include/vendor.sh | |
parent | 0e0b12a630d2f4846488233cf33fe4abaa185112 (diff) |
put cachedir in environmental variable
XBMK_CACHE is now used, instead of hardcoding cache/
this is exported initialised to cache/, if unset.
this means you can set your own directory, and it means
./update release will use the same directory.
this means bandwidth wastage is further avoided.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/vendor.sh')
-rw-r--r-- | include/vendor.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/vendor.sh b/include/vendor.sh index 426e0f5f..e14ea1ca 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -8,7 +8,7 @@ me7updateparser="$PWD/util/me7_update_parser/me7_update_parser.py" pfs_extract="$PWD/src/biosutilities/Dell_PFS_Extract.py" uefiextract="$PWD/elf/uefitool/uefiextract" vendir="vendorfiles" -appdir="cache/app" +appdir="$XBMK_CACHE/app" cbcfgsdir="config/coreboot" eval `setvars "" EC_url_bkup EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \ @@ -78,11 +78,12 @@ getfiles() fetch() { dl_type="$1"; dl="$2"; dl_bkup="$3"; dlsum="$4"; _dest="${5##*../}" - [ "$5" = "/dev/null" ] && return 0; _dl="cache/file/$dlsum" + [ "$5" = "/dev/null" ] && return 0; _dl="$XBMK_CACHE/file/$dlsum" download "$dl" "$dl_bkup" "$_dl" "$dlsum" - x_ rm -Rf "${_dl}_extracted" + rm -Rf "${_dl}_extracted" || \ + $err "!rm -Rf ${_ul}_extracted" e "$_dest" f && return 0 mkdir -p "${_dest%/*}" || $err "mkdirs: !mkdir -p ${_dest%/*}" |