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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 149 - (show annotations)
Fri May 10 16:15:10 2002 UTC (21 years, 10 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 #! /bin/sh
2
3 make_targets_file()
4 {
5 # local file line line_nr error targets_file files
6 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 if echo $line | grep -q '\[.*\]'; then
18 # The use of ! is not portable.
19 echo -n "$file $line_nr " >> "$targets_file"
20 echo $line | sed -e 's,^[^\[]*\[,,' -e 's,\].*$,,' \
21 >> "$targets_file"
22 else
23 echo "In \`$file\' line $line_nr: target brackets inbalance" >&2
24 error=1
25 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