[gimp-web-devel/hugo] tool for finding link rot



commit 2157ae0f2c462e4f8dacd3e6e6707a4eba1731a3
Author: robin-swift <robinswiftart gmail com>
Date:   Wed Jul 27 16:27:42 2022 +0100

    tool for finding link rot

 scripts/link_rot.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/scripts/link_rot.sh b/scripts/link_rot.sh
new file mode 100644
index 0000000..f09265d
--- /dev/null
+++ b/scripts/link_rot.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+function find_link_rot () {
+wget -r https://developer.gimp.org/
+
+for file in `find developer.gimp.org`
+do
+    URL="$1/${file:19}"
+    curl --head --silent --fail $URL &> /dev/null
+       if [ $? -ne 0 ]
+       then
+       echo "The URL $URL is missing."
+       fi
+done
+}
+
+find_link_rot http://localhost:1313


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]