Compare commits

...

3 Commits

Author SHA1 Message Date
4ece102919 improve front page 2023-05-17 11:52:10 +08:00
631da6652a bug fix (Mon May 15 17:16:16 CST 2023) 2023-05-15 17:16:16 +08:00
718274af9d fix for empty lines 2023-05-15 17:13:55 +08:00
2 changed files with 11 additions and 3 deletions

View File

@@ -42,14 +42,14 @@
<script src="https://tools.beardic.cn/js/pagemap.min.js"></script>
<script src="https://tools.beardic.cn/js/page.js"></script>
<title>ibd.ink / mirrors</title>
<title>Status of Mirrors</title>
</head>
<body>
<section class="container md-shadow">
<article>
<header>
<h1>ibd.ink / mirrors: Status</h1>
<h1><span id="hostname"></span>/mirrors: status</h1>
</header>
<table align="center">
<thead>
@@ -70,6 +70,7 @@
</section>
<script>
$("#hostname").text(window.location.hostname);
$.get("index", function(data){
const list = data.split('\n')
for (i in list) {

View File

@@ -30,6 +30,9 @@ locked() {
}
do_sync() {
if [[ -z "$1" ]]; then
return
fi
local name="$1"
local safe_name="${name//\//_}"
local src="$2"
@@ -50,10 +53,14 @@ do_sync() {
}
append_index() {
if [[ -z "$1" ]]; then
return
fi
echo "$1" >> "$STATUS_INDEX"
}
echo > "$STATUS_INDEX"
rm "$STATUS_INDEX"
touch "$STATUS_INDEX"
while read p || [[ -n $p ]]; do
append_index $p
done < "$THIS_DIR"/config