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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (show annotations)
Sun Dec 10 16:53:59 2000 UTC (23 years, 3 months ago) by frodo
File MIME type: application/x-sh
File size: 1454 byte(s)
(Frodo) Now formats generation works too in the new structure

1 #!/bin/sh
2
3 if test "$#" -lt 3 ; then
4 echo "Syntax: $0 psiconv_dir output_dir files..."
5 exit 1
6 fi
7
8 if ! test -d "$1"/program/psiconv ; then
9 echo "First parameter should be base psiconv directory!"
10 exit 1
11 fi
12 basedir=`cd $1; pwd`
13
14 if ! test -d "$2" ; then
15 echo "Output directory does not exist!"
16 exit 1
17 fi
18 outputdir=`cd $2; pwd`
19
20
21 shift
22 shift
23 echo "Generating html docs..."
24
25 libtool=$basedir/libtool
26 psiconv=$basedir/program/psiconv/psiconv
27 indexfile=$outputdir/index
28 tempdir=$outputdir/.temp
29 mkindex=$basedir/formats/index_html.sh
30 index=$tempdir/index
31 mkdef=$basedir/formats/html_links.sh
32
33
34 echo "Going to create the intermediate files..."
35 rm -rf $tempdir
36 mkdir $tempdir
37 for file in "$@"; do
38 echo "Going to process $file..."
39 outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'`
40 echo $libtool --mode=execute $psiconv $file -o $outputfile -Thtml3
41 $libtool --mode=execute $psiconv $file -o $outputfile -Thtml3
42 done
43
44 echo "Going to produce the index..."
45 (
46 cd $tempdir
47 files=
48 for file in "$@"; do
49 files="$files `basename $file|sed s,'.psi$','.html',`"
50 done
51 $mkindex $index $files
52 )
53
54 echo "Going to produce the final files..."
55 for file in "$@"; do
56 echo "Going to process $file..."
57 inputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'`
58 outputfile=$outputdir/`basename $file|sed s,'.psi$','.html,'`
59 rm -f $outputfile
60 echo $mkdef $index $inputfile \> $outputfile
61 $mkdef $index $inputfile > $outputfile
62 done

Properties

Name Value
svn:executable *

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