mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
22 lines
No EOL
498 B
Bash
Executable file
22 lines
No EOL
498 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." |