# ### ### mklinklist1.sh ### ### Create linklist1.sh file in current directory ### ### Same as mklinklist.sh, except it uses link1.sh ### instead of link.sh. Will create links only ### in target directory, rather than in AND beneath ### target directory ### ### ### PATH=/usr/local/bin:$PATH if [ "$2" = "" ] then echo "Usage: mklinklist1.sh filetype targetdirectory [ $package ] " exit 1 fi filetype=$1 targetdir=$2 package=$3 if [ "$package" != "" ] then echo "link1.sh $package \$x package-summary.html $package" >> linklist1.sh else package="null" fi if [ "$filetype" = "html" ] then if [ "$targetdir" = "\." ] then continue fi echo "date" > linklist1.sh echo "x=$targetdir" >> linklist1.sh ls -1 *.html 2>/dev/null | \ grep -v package | \ grep -v index | \ sed "s/^/link1.sh $package \$x /" > tmp.out ls -1 *.html 2>/dev/null | \ grep -v package | \ grep -v index | \ sed "s/\.html//" > tmp1.out paste -d" " tmp.out tmp1.out >> linklist1.sh echo "date" >> linklist1.sh fi if [ "$filetype" = "java" ] then echo "date" > linklist1.sh echo "x=$targetdir" >> linklist1.sh ls -1 *.java.html 2>/dev/null | \ grep -v package | \ sed "s/^/link1.sh $package \$x /" > tmp.out ls -1 *.java.html 2>/dev/null | \ grep -v package | \ sed "s/\.java\.html//" > tmp1.out paste -d" " tmp.out tmp1.out >> linklist1.sh echo "date" >> linklist1.sh fi if [ "$filetype" = "xml" ] then echo "date" > linklist1.sh echo "x=$targetdir" >> linklist1.sh ls -1 *.xml.html 2>/dev/null | sed "s/^/link1.sh $package \$x /" > tmp.out ls -1 *.xml.html 2>/dev/null | sed "s/\.html//" > tmp1.out paste -d" " tmp.out tmp1.out >> linklist1.sh echo "date" >> linklist1.sh fi