Improve cache usage
1. Only download cached files that are not present in the current cache 2. Try pulling directly from the cache, not only with the target information
This commit is contained in:
+3
-1
@@ -77,7 +77,9 @@ downloads:
|
||||
- |-
|
||||
for vars in $(find distros/ -name '*.pkrvars.hcl'); do
|
||||
file=$(echo var.iso.url | packer console -var-file=${vars} -config-type=hcl2 sources/)
|
||||
files+=("-O" "${file}")
|
||||
if [ ! -e "cache/${file}" ]; then
|
||||
files+=("-O" "${file}")
|
||||
fi
|
||||
done
|
||||
- mkdir -p cache
|
||||
- pushd cache
|
||||
|
||||
Reference in New Issue
Block a user