Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
galaxyproject
GitHub Repository: galaxyproject/training-material
Path: blob/main/bin/check-redirects.sh
1677 views
1
curl https://training.galaxyproject.org/sitemap.xml | xpath -q -e '//url/loc/text()' | \
2
grep -v '/training-material/api/' | \
3
egrep -v '\.ya?ml$' | \
4
grep -v 'slides-plain.html$' | \
5
sed 's|https://training.galaxyproject.org|http://localhost:4002|' > /tmp/urls
6
for x in `cat /tmp/urls`; do
7
resp=$(curl -s -w "%{http_code}\n" $x -o /dev/null);
8
if (( resp != 200 )); then
9
echo $x;
10
fi;
11
done
12
13