Add badge
This commit is contained in:
parent
97a9b7e48c
commit
a15952860a
|
@ -38,6 +38,8 @@ for line in $(cat not_sync.yaml | yq -j '.not_sync[] | .image_pattern , "=", (.t
|
|||
EXCLUDED_MAP["${key}"]="${val}"
|
||||
done
|
||||
|
||||
LOGFILE="./check-image.log"
|
||||
|
||||
for line in $(cat ./mirror.txt); do
|
||||
line="${line/ /}"
|
||||
if [[ "$line" == "" ]]; then
|
||||
|
@ -55,7 +57,14 @@ 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=true INCREMENTAL=true EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" || {
|
||||
DEBUG=true INCREMENTAL=true EXCLUDED="${exclude}" ./scripts/diff-image.sh "${line}" "${new_image}" | tee -a "${LOGFILE}" || {
|
||||
echo "Error: diff image ${line} ${new_image}"
|
||||
}
|
||||
done
|
||||
|
||||
sync=$(cat "${LOGFILE}" | grep " SYNC: " | wc -l | tr -d ' ')
|
||||
nosync=$(cat "${LOGFILE}" | grep " NOSYNC: " | wc -l | tr -d ' ')
|
||||
sum=$(($sync + $nosync))
|
||||
|
||||
echo https://img.shields.io/badge/Sync-${sync}%2F${sum}-blue
|
||||
wget "https://img.shields.io/badge/Sync-${sync}%2F${sum}-blue" -O sync.svg
|
||||
|
|
Loading…
Reference in New Issue