# HG changeset patch # User haftmann # Date 1127831616 -7200 # Node ID b61966d74ff1ff16a54c5324a86600bcde7e7826 # Parent 25d8a4586836a6ad99f878fc9efd0bbda3412ac8 added simple linktester for isabelle website diff -r 25d8a4586836 -r b61966d74ff1 Admin/linktest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/linktest Tue Sep 27 16:33:36 2005 +0200 @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# $Id$ +# +# leightweight link checker for the isabelle website + + +PRG=`basename "$0"` + +usage() +{ + echo + echo "Usage: $PRG URL" + echo + exit 1 +} + +fail() +{ + echo "$1" >&2 + exit 2 +} + +url="$1" +if [ -z "$url" ] +then + usage; +fi + +type -p ggrep > /dev/zero && GREP=ggrep || GREP=grep + +mkdir -p /tmp/isa_linktest +dir=$(pwd) +cd /tmp/isa_linktest +exec wget --non-verbose --cookies=off --recursive --convert-links --page-requisites \ + --delete-after \ + "$url" \ + 2>&1 | "$GREP" -i -B1 "ERROR" +cd "$dir" +rm -rf /tmp/isa_linktest +# --spider --domains="isabelle.in.tum.de isabelle.informatik.tu-muenchen.de"