changeset 450:235a5541e06e

CheckMercurialLinks.sh
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 Jul 2020 09:39:25 +0200
parents 2922fb1bd65e
children 938206110483 a983d7c639dd
files Sphinx/source/CheckMercurialLinks.sh
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sphinx/source/CheckMercurialLinks.sh	Fri Jul 03 09:39:25 2020 +0200
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+grep -r '<https://hg.orthanc-server.com' | grep -v CheckMercurialLinks.sh | cut -d '<' -f 2 | cut -d '>' -f 1 | sort | uniq | while read url
+do
+    echo "${url}"
+    curl -s "${url}" > /dev/null
+    if [ $? -ne 0 ]
+    then
+        echo "ERROR!!!"
+        exit -1
+    fi
+done
+
+echo "SUCCESS"