annotate Sphinx/source/CheckMercurialLinks.sh @ 1113:a588960a72e5 default tip

spelling
author Alain Mazy <am@orthanc.team>
date Mon, 28 Oct 2024 09:23:08 +0100
parents 05b106383b2a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
450
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
993
05b106383b2a migration to UCLouvain servers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 461
diff changeset
3 grep -r '<https://orthanc.uclouvain.be/hg' | grep -vE 'CheckMercurialLinks.sh|~:' | cut -d '<' -f 2 | cut -d '>' -f 1 | sort | uniq | while read url
450
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 do
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 echo "${url}"
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 curl -s "${url}" > /dev/null
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 if [ $? -ne 0 ]
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 then
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 echo "ERROR!!!"
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 exit -1
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 fi
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 done
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 echo "SUCCESS"