New build path variable
[freeradius.git] / doc / rfc / update.sh
1 #!/bin/sh
2 #
3 #  This script makes an HTML page from a simple directory listing
4 #
5 #
6 cat >index.html <<EOF
7 <HTML>
8 <TITLE>Index of FreeRADIUS.org's RFC site</TITLE>
9 <BODY>
10
11 <H1>Index of FreeRADIUS.org's RFC site</H1>
12
13 List of <A HREF="attributes.html">RADIUS attributes</A>
14 <P>
15
16 EOF
17
18 #
19 #  include the message, if any exists
20 #
21 if [ -e message ]; then
22   echo "<PRE>" >> index.html
23   cat .message >> index.html
24   echo "</PRE>" >> index.html
25 fi
26
27 #
28 #  for all of the text files, do this
29 #
30 cat >>index.html <<EOF
31 <h2>RFC's</h2>
32 EOF
33
34 for x in rfc*.html;do
35   y=`echo $x | sed 's/rfc//;s/\.html//'`
36   echo "<A HREF=\"$x\">RFC $y</A>" >> index.html
37   if [ -e $x.gz ]; then
38     echo "<A HREF=\"$x.gz\">(gzipped)</A>" >> index.html
39   fi
40   y="attributes-rfc$y.html";
41   if [ -f $y ];then
42     echo "<A HREF=\"$y\">(attributes)</A>" >> index.html
43   fi
44   echo "<BR />" >> index.html
45 done
46
47 cat >>index.html <<EOF
48 <h2>Other files</h2>
49 EOF
50
51 #
52 #  for all of the text files, do this
53 #
54 for x in *.txt;do
55   y=`echo $x | sed ';s/\.txt/.html/'`
56   if [ ! -f $y ];then
57     echo "<A HREF=\"$x\">$x</A>" >> index.html
58     if [ -e $x.gz ]; then
59       echo "<A HREF=\"$x.gz\">(gzipped)</A>" >> index.html
60     fi
61     echo "<BR />" >> index.html
62   fi
63 done
64 echo "</BODY></HTML>" >> index.html