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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (hide annotations)
Fri May 10 16:15:10 2002 UTC (21 years, 11 months ago) by frodo
File MIME type: application/x-sh
File size: 1000 byte(s)
(Frodo) Compile on non-Linux platforms: Keitha Kawabe <keita.kawabe@mpq.mpg.de>

1 frodo 149 #! /bin/sh
2 frodo 2
3 frodo 149 make_targets_file()
4 frodo 2 {
5 frodo 149 # local file line line_nr error targets_file files
6 frodo 2 targets_file="$1"
7     shift
8     files="$@"
9     echo -n "" > "$targets_file"
10    
11     for file in $files; do
12     (
13     line_nr=1
14     while read line; do
15     error=0
16     while [ $error -eq 0 ] && echo $line | grep -q '\[' ; do
17 frodo 149 if echo $line | grep -q '\[.*\]'; then
18     # The use of ! is not portable.
19 frodo 2 echo -n "$file $line_nr " >> "$targets_file"
20     echo $line | sed -e 's,^[^\[]*\[,,' -e 's,\].*$,,' \
21     >> "$targets_file"
22 frodo 149 else
23     echo "In \`$file\' line $line_nr: target brackets inbalance" >&2
24     error=1
25 frodo 2 fi
26     line=`echo $line | sed -e 's,^[^]]*\],,'`
27     done
28     if [ $error -eq 0 ] && echo $line | grep -q '\]' ; then
29     echo "In \`$file\' line $line_nr: target brackets inbalance" >&2
30     error=1
31     fi
32     line_nr=$[$line_nr+1]
33     done
34     ) < $file
35     done
36     }
37    
38    
39     make_targets_file "$@"

Properties

Name Value
svn:executable *

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