[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: linkchecker: improve linkcheck
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: linkchecker: improve linkchecker script |
Date: |
Mon, 15 Jan 2024 18:51:01 +0100 |
This is an automated email from the git hooks/post-receive script.
devan-carpenter pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new b698eeb linkchecker: improve linkchecker script
b698eeb is described below
commit b698eebbcd6175849ac4506706966c51f8ea58f3
Author: Devan Carpenter <devan@taler.net>
AuthorDate: Mon Jan 15 12:46:49 2024 -0500
linkchecker: improve linkchecker script
improves readability and flexibility by making the following changes:
reduce repetition, make arguments long-form, use variables to configure
options, print wget output to stdout as its running
---
buildbot/linkchecker.sh | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/buildbot/linkchecker.sh b/buildbot/linkchecker.sh
index 0986181..4ff9578 100755
--- a/buildbot/linkchecker.sh
+++ b/buildbot/linkchecker.sh
@@ -1,11 +1,14 @@
#!/bin/bash
-set -v
+#set -v
# Removed because wget errors with error 8 (Server issued an error response.)
#set -e
## This script will scan www.taler.net for broken links and e-mail a copy of
the log if any are found.
-logfile="linkchecker.log"
+logfile="$HOME/linkchecker.log"
+wait_time="0"
+recurse_level="1"
+ignore_list="(.*)demo.taler.net(.*)\/orders\/(.*)" # appears to do *nothing*
# Remove old log
@@ -18,19 +21,18 @@ if [ -f "$logfile" ]
fi
# Use wget to scan hosts and save output
-wget --spider -r -nd -nv -H -l 1 -w 2 -o $logfile https://www.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile https://docs.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile https://taler-systems.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile https://demo.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile https://bank.demo.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile https://shop.demo.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile
https://donations.demo.taler.net/
-wget --spider -r -nd -nv -H -l 1 -w 2 -a $logfile
https://survey.demo.taler.net/
-
-# display logfile
-echo
-echo "Displaying contents of logfile"
-cat $logfile
+for url in "https://www.taler.net/" "https://docs.taler.net/"
"https://taler-systems.net/" "https://demo.taler.net/"
"https://bank.demo.taler.net/" "https://shop.demo.taler.net/"
"https://donations.demo.taler.net/" "https://survey.demo.taler.net/" ; do
+ echo "Starting check on $url"
+ wget --spider \
+ --recursive \
+ --no-directories \
+ --no-verbose \
+ --span-hosts \
+ --level="$recurse_level" \
+ --wait="$wait_time" \
+ --reject-regex "$ignore_list" \
+ "$url" 2>&1 | tee --append "$logfile"
+done
# Search the log for the phrase "broken link" as this is what wget will report
if grep -iRl 'broken link!!' $logfile
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: linkchecker: improve linkchecker script,
gnunet <=