/[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 251 - (hide annotations)
Thu Apr 29 21:57:33 2004 UTC (20 years, 6 months ago) by frodo
File MIME type: application/x-sh
File size: 789 byte(s)
(Frodo) And after the Solaris changes, it now works again on Linux

Don't you love shell scripting?

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 frodo 251 printf "%s %s " -e \''s,\['"$name"'\],<A NAME="'"$name"'">,g'\'
9     printf "%s %s " -e \''s,&#xab;'"$name"'&#xbb;,<A HREF="'"$file"\#"$name"'">'"$name"'</A>,g'\'
10 frodo 250 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