#! /bin/tcsh -f ###################################################################### # # Build lists of URLs for the random link feature set me=${0:t} # name of this script goto Start ###################################################################### Usage: cat << END_INPUT usage: $me:t Build lists of URLs for the random link feature END_INPUT exit ###################################################################### Start: if ($# >= 1) then goto Usage endif # Abort if the required env variables aren't set if (! ${?HTML_DIR}) then echo ${me}: HTML_DIR environment variable not set\! exit endif build_most-urls.pl # Now do the authors, which require special treatment set theURLFile = ${HTML_DIR}/tech/download/list-author-urls.txt echo > $theURLFile set files=`echo ${HTML_DIR}/lib/authors/*/index.html ${HTML_DIR}/lib/thai/*/index.html` foreach x ($files) set x = `echo "$x" | sed -e "s/\/Users\/jtb\/Sites\/ati\///"` echo "http://www.accesstoinsight.org/$x" >> $theURLFile end set n = `wc -l $theURLFile | sed -e "s/\/.*//"` echo "${me}: wrote $n urls to ${theURLFile}."