#!/bin/sh # $Id$ unset LIVE if test "$1" == "--live"; then # can't just do this -- need to post-edit. #unset NOSERVERNOTIFICATION echo "--live is not currently implemented" LIVE=yes fi MYDIR=`dirname "$0"` XMLINPUT="$MYDIR/sitemap_gen_config.xml" XMLOUTPUT="/tmp/sitemap_gen_config.$$.xml" sed "s;/path/to/root/dir;$MYDIR;" \ < "$XMLINPUT" \ > "$XMLOUTPUT" python /home/andy/scratch/sitemap_gen-1.4/sitemap_gen.py --config="$XMLOUTPUT" --testing perl -lpwe 'if (m/(didcot|cholsey|wallingford)\.html/) { $setPriority="0.8"; }; if (m/(index|seminars)\.html/) { $setPriority="0.6"; }; if (m// and defined $setPriority) { s;[0-9.]+;$setPriority;; undef $setPriority; }' sitemap_raw.xml > sitemap_new.xml if test -f sitemap.xml && diff sitemap.xml sitemap_new.xml; then echo "no changes" else echo "sitemap updated" mv sitemap_new.xml sitemap.xml fi rm -f sitemap_new.xml sitemap_raw.xml "$XMLOUTPUT"