File: indexit

package info (click to toggle)
doc-linux-de 98.03-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 584 kB
  • ctags: 5
  • sloc: sh: 59; makefile: 50
file content (36 lines) | stat: -rwxr-xr-x 1,132 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

echo "<HTML>" > index.html
echo "<HEAD><TITLE>Deutsches Linux HOWTO Projekt</TITLE></HEAD>" >> index.html
echo "<BODY BGCOLOR="#FFFFFF">" >> index.html
echo "<H1>Deutsches Linux HOWTO Projekt</H1>" >> index.html

echo "<TABLE>" >> index.html

for i in DE-*HOWTO.html ; do

  # index.html erzeugen
  echo "<TR><TD VALIGN=baseline><A HREF=\""$i"\">"$i"</A>" >> index.html
  echo "    <TD>" >> index.html
  ANFANG=$(grep -n "<P><HR><EM>" $i | cut - -f1 -d:);
  ENDE=$(grep -n "</EM><HR></P>" $i | cut - -f1 -d:);
  head -n $ENDE $i | tail +$ANFANG | sed -e 's/<P><HR><EM>//g' | \
   sed -e 's/<\/EM><HR><\/P>//g' >> index.html

  # Link auf index.html in jedem Inhaltverzeichnis der HOWTOs erzeugen
  mv $i 1.tmp
  sed -e 's/<IMG SRC="toc.gif" ALT="Inhalt">/<A HREF="index.html"><IMG SRC="toc.gif" ALT="Inhalt DLHP"><\/A>/' 1.tmp > $i 

done

echo "<TR><TD><A HREF="mini/index.html">mini/</A><TD>mini HOWTO Verzeichnis" >> index.html
echo "</TABLE><HR>" >> index.html
date >> index.html
echo "</BODY></HTML>" >> index.html

mv index.html 1.tmp

sed -e 's/.html</</' 1.tmp | \
sed -e 's/>DE-/>/'  > index.html

rm -f 1.tmp