Rev 23 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | #! /bin/sh |
2 | |||
3 | if [ ! -d def ]; then exit; fi |
||
4 | |||
5 | rm -f Exindex Extitles >/dev/null |
||
6 | cd def |
||
7 | list=`ls *.def 2>/dev/null | sed 's/\.def//g'` |
||
8 | cd .. |
||
9 | |||
10 | if [ -z "$list" ]; then exit; fi |
||
11 | titlist= |
||
12 | for i in $list |
||
13 | do |
||
14 | tit=`awk -F= 'NF>=2 {print $2; exit}' def/$i.def | tr ',\11' '; '` |
||
15 | echo "$i:$tit" >>Extitles |
||
16 | titlist="$titlist$tit |
||
17 | " |
||
18 | done |
||
19 | |||
20 | echo "$titlist" >tmp1 |
||
21 | echo "$list" >tmp2 |
||
22 | llist=`paste tmp1 tmp2 | sort -f` |
||
23 | list=`echo "$llist" | awk -F'\11' 'length()>2 {print $2}' | tr '\n' ','` |
||
24 | titlist=`echo "$llist" | awk -F'\11' 'length()>2 {print $1}' | tr '\n' ','` |
||
25 | |||
26 | cat >Exindex <<@ |
||
27 | !set exolist =!char 1 to -2 of $list |
||
28 | !set titlelist=!char 1 to -2 of $titlist |
||
29 | !set exototal =!itemcnt \$exolist |
||
30 | |||
31 | @ |
||
32 | |||
33 | rm -f tmp1 tmp2 |
||
34 |