File: index.sh

package info (click to toggle)
fungw 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,268 kB
  • sloc: ansic: 24,257; makefile: 500; sh: 32; awk: 9; perl: 8; tcl: 7; javascript: 7; ruby: 7; python: 6
file content (32 lines) | stat: -rwxr-xr-x 363 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

first_para() {
	awk '
		/^[ \t]*$/ { exit }
		{ print $0 }
	'
}

gen_index()
{

cat index_pre.html
echo "EXAMPLES=\\" >&3

for n in *
do
	if test -f $n/Readme.txt
	then
		echo "<tr><td> <a href=\"$n\"> $n </a> <td><p>"
		first_para < $n/Readme.txt
		echo "	$n \\" >&3
	fi
done

cat index_post.html
echo "" >&3

}


gen_index > index.html 3>Makefile.ex