view Sphinx/source/CheckMercurialLinks.sh @ 461:a10f0e5be459

Orthanc 1.7.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 Jul 2020 16:34:29 +0200
parents 235a5541e06e
children 05b106383b2a
line wrap: on
line source

#!/bin/bash

grep -r '<https://hg.orthanc-server.com' | grep -vE '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"