Split mirrors
This commit is contained in:
parent
11a230f39c
commit
ac0e9aae2b
@ -7,6 +7,8 @@ theme:
|
||||
language: en
|
||||
logo: https://wiki.almalinux.org/images/logo.png
|
||||
favicon: https://almalinux.org/fav/favicon-32x32.png
|
||||
features:
|
||||
- content.tabs.link
|
||||
palette:
|
||||
- scheme: default
|
||||
primary: white
|
||||
@ -28,6 +30,10 @@ plugins:
|
||||
htmlmin_opts:
|
||||
remove_comments: true
|
||||
cache_safe: true
|
||||
markdown_extensions:
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/brands/github
|
||||
|
46
run.sh
46
run.sh
@ -44,8 +44,13 @@ echo ""
|
||||
echo "- Address: \`rsync.repo.almalinux.org\`"
|
||||
echo "- Last update: \`$(date -ud "@$ORIGINAL_TIME" +"%Y-%m-%d %H:%M:%S") UTC\`"
|
||||
echo ""
|
||||
echo "| Mirror Name | Sponsor | Status |"
|
||||
echo "|:--|:--|:--|"
|
||||
|
||||
declare -a IN_SYNC
|
||||
declare -a BEHIND
|
||||
declare -a UNAVAILABLE
|
||||
i=0
|
||||
j=0
|
||||
k=0
|
||||
|
||||
for FILE in $FILES; do
|
||||
DETAILS=$(curl -fsSL "https://raw.githubusercontent.com/AlmaLinux/mirrors/master/mirrors.d/$FILE")
|
||||
@ -69,19 +74,52 @@ for FILE in $FILES; do
|
||||
|
||||
if [ "$DIFF" -eq 0 ]; then
|
||||
TIME="IN SYNC"
|
||||
IN_SYNC[$i]="| $NAME | $SPONSOR |"
|
||||
i=$((i+1))
|
||||
else
|
||||
TIME="$(date -d "@$(($DIFF))" +"%Hh %Mmin") behind"
|
||||
BEHIND[$j]="| $NAME | $SPONSOR | $TIME |"
|
||||
j=$((j+1))
|
||||
fi
|
||||
else
|
||||
TIME="Unavailable"
|
||||
UNAVAILABLE[$k]="| $NAME | $SPONSOR |"
|
||||
k=$((k+1))
|
||||
fi
|
||||
else
|
||||
TIME="Unavailable"
|
||||
UNAVAILABLE[$k]="| $NAME | $SPONSOR |"
|
||||
k=$((k+1))
|
||||
fi
|
||||
|
||||
echo "| $NAME | $SPONSOR | $TIME |"
|
||||
done
|
||||
|
||||
echo "=== \"In sync\""
|
||||
echo ""
|
||||
echo " | Mirror Name | Sponsor |"
|
||||
echo " |:--|:--|"
|
||||
for value in "${IN_SYNC[@]}"; do
|
||||
echo " $value"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== \"Behind primary\""
|
||||
echo ""
|
||||
echo " | Mirror Name | Sponsor | Time behind primary |"
|
||||
echo " |:--|:--|:--|"
|
||||
for value in "${BEHIND[@]}"; do
|
||||
echo " $value"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== \"Unavailable\""
|
||||
echo ""
|
||||
echo " | Mirror Name | Sponsor |"
|
||||
echo " |:--|:--|"
|
||||
for value in "${UNAVAILABLE[@]}"; do
|
||||
echo " $value"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Last report update: \`$(date -u +"%Y-%m-%d %H:%M:%S") UTC\`"
|
||||
echo ""
|
||||
|
Loading…
Reference in New Issue
Block a user