Pass environment variable
This commit is contained in:
parent
81c2f75375
commit
8b5190e06c
|
@ -4,6 +4,9 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
DEBUG="${DEBUG:-}"
|
||||||
|
INCREMENTAL="${INCREMENTAL:-}"
|
||||||
|
|
||||||
declare -A DOMAIN_MAP=()
|
declare -A DOMAIN_MAP=()
|
||||||
|
|
||||||
for line in $(cat ./domain.txt); do
|
for line in $(cat ./domain.txt); do
|
||||||
|
@ -58,7 +61,7 @@ for line in $(cat ./mirror.txt); do
|
||||||
domain="${line%%/*}"
|
domain="${line%%/*}"
|
||||||
new_image=$(echo "${line}" | sed "s/^${domain}/${DOMAIN_MAP["${domain}"]}/g")
|
new_image=$(echo "${line}" | sed "s/^${domain}/${DOMAIN_MAP["${domain}"]}/g")
|
||||||
echo "Diff image ${line} ${new_image}"
|
echo "Diff image ${line} ${new_image}"
|
||||||
DEBUG=true INCREMENTAL=true EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" 2>&1 | tee -a "${LOGFILE}" || {
|
DEBUG="${DEBUG}" INCREMENTAL="${INCREMENTAL}" EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" 2>&1 | tee -a "${LOGFILE}" || {
|
||||||
echo "Error: diff image ${line} ${new_image}"
|
echo "Error: diff image ${line} ${new_image}"
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue