fix shellcheck

Signed-off-by: Jess Frazelle <acidburn@github.com>
This commit is contained in:
Jess Frazelle 2018-12-28 19:40:53 -05:00
parent 683cbbbe00
commit 12e77bc673
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -46,15 +46,15 @@ for repo in "${repos[@]}"; do
# continue the loop since we cannot cat
continue
fi
manifest_media_type=$(echo ${manifest} | jq -r '.mediaType')
manifest_media_type=$(echo "${manifest}" | jq -r '.mediaType')
echo "media-type: $manifest_media_type"
if [ "${manifest_media_type}" == "application/vnd.docker.distribution.manifest.list.v2+json" ] ; then
# we have a manifest list and fetch the referenced manifests
additional_manifests=( $(echo ${manifest} | jq -r '.["manifests"] | .[].digest' | cut -d: -f2) )
mapfile -t additional_manifests < <(echo "${manifest}" | jq -r '.["manifests"] | .[].digest' | cut -d: -f2)
echo "additional_manifests: ${additional_manifests[@]}"
echo "additional_manifests: ${additional_manifests[*]}"
fi
echo "repo: $repo | tag: $tag | current: ${ha}:${id}"
@ -67,7 +67,7 @@ for repo in "${repos[@]}"; do
# shellcheck disable=SC2199
if [[ "${shas[@]}" != "" ]] && [[ ! -z "${shas[@]}" ]]; then
echo "[to be removed]: ${shas[@]}"
echo "[to be removed]: ${shas[*]}"
#parallel -j"${JOBS}" reg rm "${REPO_URL}/${repo}@${ha}:{1}" ::: "${shas[@]}" || true
fi
done