Fix target sync (#411)

This commit is contained in:
Shiming Zhang 2023-10-12 18:20:17 +08:00 committed by GitHub
parent 26da880f54
commit fd9ca3c4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -296,14 +296,13 @@ function main() {
local image2="${2:-}"
if [[ "${image1#*/}" =~ ":" ]]; then
diff-image-with-tag "${image1}" "${image2}" >/dev/null || {
if [[ "${SYNC}" == "true" ]]; then
echo "${SELF}: SYNCHRONIZE: synchronize from ${image1} to ${image2}" >&2
copy-image "${image1}" "${image2}"
fi
if [[ "${SYNC}" == "true" ]]; then
echo "${SELF}: SYNCHRONIZE: synchronize from ${image1} to ${image2}" >&2
copy-image "${image1}" "${image2}"
return $?
}
return 0
fi
diff-image-with-tag "${image1}" "${image2}" >/dev/null
return $?
fi
local list=$(diff-image "${image1}" "${image2}")