consider incremental option for batch

master
Fabien Benetou 13 years ago
parent 340a91c0bd
commit 0f5e825bc5
  1. 7
      shell_scripts/wiki_link_checking

@ -1,7 +1,10 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# http://fabien.benetou.fr/Wiki/ToDo#Maintenance # http://fabien.benetou.fr/Wiki/ToDo#Maintenance
# TODO # TODO
# add incremental option to use with batch
# generalize for other URLs # generalize for other URLs
if [ $# -lt 1 ] if [ $# -lt 1 ]
then then
echo "Check page per page against dead links for PmWiki" echo "Check page per page against dead links for PmWiki"
@ -11,6 +14,10 @@ fi
PATH=$1 PATH=$1
NOW_EPOCH=$(date +"%s") NOW_EPOCH=$(date +"%s")
URL=http://fabien.benetou.fr/ URL=http://fabien.benetou.fr/
# get the last link checked
# if last or none start from link 1
for PAGE in $(ls $1/wiki.d/* | grep -v PmWiki. | grep -v Site | sed "s/.*wiki\.d\///" | tr "." "/") for PAGE in $(ls $1/wiki.d/* | grep -v PmWiki. | grep -v Site | sed "s/.*wiki\.d\///" | tr "." "/")
do do
checklink -s $URL/$PAGE > $PATH/pub/checking/$(echo $PAGE|tr "/" ".").check checklink -s $URL/$PAGE > $PATH/pub/checking/$(echo $PAGE|tr "/" ".").check

Loading…
Cancel
Save