OSDN Git Service

Merge branch 'master' of git.sourceforge.jp:/gitroot/eos/base
[eos/base.git] / sbin / htmlDirList
1 #!/bin/sh
2 #
3 # htmlDirList  1.1
4 #
5 # The latest update : 12/22/95 at 09:56:10
6 #
7 #@(#) htmlDirList Function
8 #@(#)
9 #
10 #@(#) Usage : htmlDirList
11 #
12 #@(#) Attention
13 #@(#)
14 #@(#) Parameter: 
15 #@(#)     Essential:
16 #@(#)     Optional:
17 #@(#)
18
19 usage()
20 {
21         echo "Usage: htmlDirList "
22 }
23
24 NameRead()
25 {
26         ans="N"
27         while [ $ans != "Y" -a $ans != "y" ]
28         do
29                 echo $1
30                 read Name
31                 echo "$Name is good ?"
32                 read ans
33         done
34 }
35 # Store Flags
36 FlagsCharacter="-"
37
38 case $# in 
39         0)
40                 ;;
41         *)
42                 while [ `echo $1 | cut -c1` = ${FlagsCharacter} ]
43                 do
44                         if [ `echo $1 | cut -c2` = "h" ] 
45                         then
46                                 usage
47                         else
48                                 parms="${parms} $1"
49                                 shift 
50                         fi
51                 done
52                 ;;
53 esac
54
55 case $# in
56         0) # No filename 
57                 ;;
58         *) #
59                 usage
60                 ;;
61 esac
62 #
63 currentDir=`pwd`
64 echo "<UL> <H2> Alphabetical List </H2>"
65 htmlList=`ls -1 *.html | sort | sed -e 's/index.html//' -e 's/.html//' `
66 for html in $htmlList
67 do
68         echo "<LI> <A HREF=\"${html}.html\"> ${html}</A>"
69 done
70 echo "</UL>"