home *** CD-ROM | disk | FTP | other *** search
/ back2roots/filegate / filegate.zip / filegate / gamesnet / g_amiga / dir2html.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2014-05-19  |  1KB  |  34 lines

  1. #!/bin/sh
  2. # Generate hypertext menu from directory list
  3. here='Gamesnet: Amiga Games '
  4. echo "<HTML>"
  5. echo "<HEAD>"
  6. echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=koi-8r\">"
  7. echo "<TITLE>$here</TITLE>"
  8. echo "</HEAD>"
  9. echo "<BODY BGCOLOR=\"#ffffff\"><a href=\"http://www.filegate.net/\">FileGate Archive</a>"
  10. echo "<HR>"
  11. echo "<h3><a name=_$here_>/$here/</a></h3>"
  12.  
  13. ls -1B > ziplist
  14. echo "<TABLE width=\75%\" cellpadding=3 cellspacing=3 cols=2 border=2 align=left tr>"
  15. echo "<td width=200><strong>File</strong></td><td><strong><pre> File name     Date    kB  Dlds  Description</pre></strong></td><tr>"
  16. #
  17. for file in `cat ziplist`
  18. do
  19.   if
  20.      test=`grep $file descript.ion`
  21. then
  22.      build=`grep -w $file /home/bbs/files.txt`
  23.      echo "<td font face=\"arial\" size=\"2\"><A href=\"$file\">$file</a></td></font> <td font face=\"arial\" size=\"2\"><pre> $build </pre> </font></td><tr>"
  24.      echo "<tr>"
  25.  fi
  26. done
  27. echo "<tr>"
  28. echo "<A HREF=\"../../\" target=\"_top\">Back to FileGate Archive</A><br>"
  29. echo "<A HREF=\"../\">Back to Gamesnet directory list</a><br>"
  30. echo "(c)<A HREF=\"mailto:janis@filegate.net\"> Send mail to Janis</A><br>"
  31. echo "</Table>"
  32. echo "</BODY>"
  33. echo "</HTML>"
  34.