/[public]/psiconv/trunk/formats/html4_links.sh
ViewVC logotype

Annotation of /psiconv/trunk/formats/html4_links.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 250 - (hide annotations)
Thu Apr 29 21:43:28 2004 UTC (20 years, 7 months ago) by frodo
File MIME type: application/x-sh
File size: 783 byte(s)
(Frodo) Solaris /bin/sh compatibility updates

/bin/sh on Solaris is just braindead, if you are used to bash (or even
Sun's ksh)

1 frodo 195 #! /bin/sh
2    
3 frodo 250 compute_command_line()
4 frodo 195 {
5     index_file="$1"
6 frodo 250 printf "sed "
7     while read file lineno name; do
8     printf "-e %s " \''s,\['"$name"'\],<A NAME="'"$name"'">,g'\'
9     printf "-e %s " \''s,&#xab;'"$name"'&#xbb;,<A HREF="'"$file"\#"$name"'">'"$name"'</A>,g'\'
10     done < "$index_file"
11     }
12 frodo 195
13 frodo 250 generate_links()
14     {
15     command=`compute_command_line "$1"`
16     #echo $command
17 frodo 195 eval "$command"
18     }
19    
20     generate_headers()
21     {
22     index_file_generate_headers="$1"
23     this_file_generate_headers=`echo $2 | sed 's,.*/,,' | sed 's,\..*$,,'`
24    
25     name_generate_headers=`grep "^$this_file_generate_headers" "$index_file_generate_headers" | head -1 | sed s,'^[^ ]* [^ ]* ,,'`
26     sed -e 's,<TITLE>.*</TITLE>,<TITLE>'"$name_generate_headers"'</TITLE>,'
27     }
28    
29    
30     cat "$2" | generate_links "$1" | generate_headers "$1" "$2"

Properties

Name Value
svn:executable *

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26