Line | |
---|
1 | # dir2html.sh by Michael Temari 03/03/96
|
---|
2 | #
|
---|
3 | #!/bin/sh
|
---|
4 | if [ $# != 0 ]
|
---|
5 | then
|
---|
6 | cd $1
|
---|
7 | fi
|
---|
8 | dname=`pwd`
|
---|
9 | fdname=$2
|
---|
10 | if [ $dname != / ]
|
---|
11 | then
|
---|
12 | dname=${dname}/
|
---|
13 | fi
|
---|
14 | echo "<HTML>"
|
---|
15 | echo "<TITLE>"
|
---|
16 | echo Directory of $fdname
|
---|
17 | echo "</TITLE>"
|
---|
18 | echo "<H1>"
|
---|
19 | echo Directory of $fdname
|
---|
20 | echo "</H1>"
|
---|
21 | echo "<HR>"
|
---|
22 | #
|
---|
23 | ls $dname |
|
---|
24 | {
|
---|
25 | while read fname
|
---|
26 | do
|
---|
27 | lname=$fdname$fname
|
---|
28 | echo "<H3>"
|
---|
29 | echo -n "<A HREF=\""
|
---|
30 | echo -n $lname
|
---|
31 | echo -n "\">"
|
---|
32 | echo -n $fname
|
---|
33 | echo "</A><BR>"
|
---|
34 | echo "</H3>"
|
---|
35 | done
|
---|
36 | }
|
---|
37 | echo "<HR>"
|
---|
38 | echo "<H6>"
|
---|
39 | echo Directory Generated at `date`
|
---|
40 | echo "</H6>"
|
---|
41 | echo "</HTML>"
|
---|
42 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.