diff --git a/mirror.sh b/mirror.sh index 00d6d84..9b0d641 100755 --- a/mirror.sh +++ b/mirror.sh @@ -8,10 +8,11 @@ USER=${REGISTRY_USER} PASSWORD=${REGISTRY_PASSWORD} MIRROR_CONFIGS=$(ls ./images/*.sh) -for file in "${MIRROR_CONFIGS[@]}"; do +# shellcheck disable=SC2068 +for file in ${MIRROR_CONFIGS[@]}; do echo "Importing ${file}..." - # shellcheck disable=SC2086 - WHAT_TO_MIRROR=( "${WHAT_TO_MIRROR[@]}" "$(bash ${file})" ) + # shellcheck disable=SC2086,SC2207,SC2206 + WHAT_TO_MIRROR=( ${WHAT_TO_MIRROR[@]} $(bash ${file}) ) done echo "Images to mirror: ${WHAT_TO_MIRROR[*]}" @@ -27,7 +28,8 @@ function mirror() { exit 1 fi - image_hash=$(docker images -a | grep "^${image_name}" | grep "${image_version}" | awk "{' print $3 '}") + # shellcheck disable=SC1083 + image_hash=$(docker images -a | grep "^${image_name}" | grep "${image_version}" | awk {' print $3 '}) echo -n "${image_hash} received... " if ! docker tag "${image_hash}" "${DESTINATION_REGISTRY}/${image}"; then