0e8a1c681b
* docker: pre-download all hub items and data, opt-in hub update/upgrade * docker/bars: don't purge anything before pre-downloading hub * Docker: README update
22 lines
499 B
Bash
Executable file
22 lines
499 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
# pre-download everything but don't install anything
|
|
|
|
echo "Pre-downloading Hub content..."
|
|
|
|
types=$(cscli hub types -o raw)
|
|
|
|
for itemtype in $types; do
|
|
ALL_ITEMS=$(cscli "$itemtype" list -a -o json | itemtype="$itemtype" yq '.[env(itemtype)][] | .name')
|
|
if [[ -n "${ALL_ITEMS}" ]]; then
|
|
#shellcheck disable=SC2086
|
|
cscli "$itemtype" install \
|
|
$ALL_ITEMS \
|
|
--download-only \
|
|
--error
|
|
fi
|
|
done
|
|
|
|
echo " done."
|