annotate Sphinx/source/CheckMercurialLinks.sh @ 450:235a5541e06e

CheckMercurialLinks.sh
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 Jul 2020 09:39:25 +0200
parents
children a10f0e5be459
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
235a5541e06e CheckMercurialLinks.sh
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 grep -r '<https://hg.orthanc-server.com' | grep -v CheckMercurialLinks.sh | cut -d '<' -f 2 | cut -d '>' -f 1 | sort | uniq | while read url
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"