# ### ### mklinklist.sh ### ### Create a file called linklist.sh ### which contains link.sh linking commands ### to files in current directory. ### ### ### Usage: ### ### mklinklist.sh filetype linkdirectory [ 1 ] ### ### Where filetype is the type of file to create ### links to: *.html, *.java, *.xml, or javadoc. ### ### linkdirectory is the directory in and under which ### to look for files in which to insert links. ### ### If a 1 is present, use link1.sh, which only looks ### in linkdirectory, and not recursively into directories ### below. ### if [ "$2" = "" ] then echo "Usage: mklinklist.sh linkdir filetype" exit 1 fi x=$1 filetype=$2 echo "date" > linklist.sh echo "x=$x" >> linklist.sh for i in `ls -1 *.$filetype | grep -v package-` do xtitle=`grep "<title" $i | sed "s,<title>,,g" | sed "s,</title>,,g"` echo "/usr/local/bin/link.sh \$x $i $xtitle" >> linklist.sh done echo "date" >> linklist.sh