mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
11 lines
338 B
Bash
Executable File
11 lines
338 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo '# robots.txt for https://mirrors.tuna.tsinghua.edu.cn' > robots.txt
|
|
echo 'User-agent: *' >> robots.txt
|
|
echo '' >> robots.txt
|
|
|
|
curl -s https://mirrors.tuna.tsinghua.edu.cn/static/tunasync.json | jq -r '.[] | .name' | uniq | while read name; do
|
|
[[ -z ${name} ]] && continue
|
|
echo "Disallow: /${name}" >> robots.txt
|
|
done
|