feat: added prefix/suffix support for GENERIC_PACKS (#1321)

For #1315
This commit is contained in:
Geoff Bourne
2022-01-30 19:49:54 -06:00
committed by GitHub
parent c55cce628d
commit eb0c30d134
8 changed files with 42 additions and 7 deletions

View File

@@ -188,13 +188,16 @@ esac
fi
: "${GENERIC_PACKS:=${GENERIC_PACK}}"
: "${GENERIC_PACKS_PREFIX:=}"
: "${GENERIC_PACKS_SUFFIX:=}"
if [[ "${GENERIC_PACKS}" ]]; then
IFS=',' read -ra packs <<< "${GENERIC_PACKS}"
packFiles=()
for pack in "${packs[@]}"; do
if isURL "$pack"; then
for packEntry in "${packs[@]}"; do
pack="${GENERIC_PACKS_PREFIX}${packEntry}${GENERIC_PACKS_SUFFIX}"
if isURL "${pack}"; then
mkdir -p /data/packs
if ! outfile=$(get -o /data/packs --output-filename --skip-existing "$pack"); then
log "ERROR: failed to download $pack"