Support parallel differential tags

This commit is contained in:
Shiming Zhang
2021-09-16 15:02:41 +08:00
parent bfd852f02c
commit 37603418ce
3 changed files with 28 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ set -o pipefail
DEBUG="${DEBUG:-}"
INCREMENTAL="${INCREMENTAL:-}"
QUICKLY="${QUICKLY:-}"
PARALLET="${PARALLET:-0}"
declare -A DOMAIN_MAP=()
@@ -45,7 +46,7 @@ done
LOGFILE="./check-image.log"
echo >"${LOGFILE}"
for line in $(cat ./mirror.txt); do
for line in $(cat ./mirror.txt | shuf); do
line="${line/ /}"
if [[ "$line" == "" ]]; then
continue
@@ -62,7 +63,7 @@ for line in $(cat ./mirror.txt); do
domain="${line%%/*}"
new_image=$(echo "${line}" | sed "s/^${domain}/${DOMAIN_MAP["${domain}"]}/g")
echo "Diff image ${line} ${new_image}"
DEBUG="${DEBUG}" QUICKLY="${QUICKLY}" INCREMENTAL="${INCREMENTAL}" EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" 2>&1 | tee -a "${LOGFILE}" || {
DEBUG="${DEBUG}" QUICKLY="${QUICKLY}" INCREMENTAL="${INCREMENTAL}" PARALLET="${PARALLET}" EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" 2>&1 | tee -a "${LOGFILE}" || {
echo "Error: diff image ${line} ${new_image}"
}
done