mirror of
https://github.com/DictXiong/dxsync.git
synced 2026-10-16 01:38:17 +08:00
Compare commits
3 Commits
71cfa14596
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ece102919 | |||
| 631da6652a | |||
| 718274af9d |
@@ -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) {
|
||||
|
||||
9
sync.sh
9
sync.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user