1 | #! /bin/sh |
1 | #! /bin/sh |
|
|
2 | |
|
|
3 | # Work around a BASH bug (prints a directory even in a non-interactive shell) |
|
|
4 | unset CDPATH |
2 | |
5 | |
3 | if test "$#" -lt 3 ; then |
6 | if test "$#" -lt 3 ; then |
4 | echo "Syntax: $0 psiconv_dir output_dir files..." |
7 | echo "Syntax: $0 psiconv_dir output_dir files..." |
5 | exit 1 |
8 | exit 1 |
6 | fi |
9 | fi |
… | |
… | |
26 | psiconv=$basedir/program/psiconv/psiconv |
29 | psiconv=$basedir/program/psiconv/psiconv |
27 | indexfile=$outputdir/index |
30 | indexfile=$outputdir/index |
28 | tempdir=$outputdir/.temp |
31 | tempdir=$outputdir/.temp |
29 | mkindex=$basedir/formats/index_html.sh |
32 | mkindex=$basedir/formats/index_html.sh |
30 | index=$tempdir/index |
33 | index=$tempdir/index |
31 | mkdef=$basedir/formats/html_links.sh |
34 | mkdef=$basedir/formats/html4_links.sh |
32 | |
35 | |
33 | |
36 | |
34 | echo "Going to create the intermediate files..." |
37 | echo "Going to create the intermediate files..." |
35 | rm -rf $tempdir |
38 | rm -rf $tempdir |
36 | mkdir $tempdir |
39 | mkdir $tempdir |
37 | for file in "$@"; do |
40 | for file in "$@"; do |
38 | echo "Going to process $file..." |
41 | echo "Going to process $file..." |
39 | outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` |
42 | outputfile=$tempdir/`basename $file|sed s,'.psi$','.html,'` |
40 | echo $libtool --mode=execute $psiconv -o $outputfile -Thtml4 $file |
43 | echo $libtool --mode=execute $psiconv -o $outputfile -Thtml4 -eASCII $file |
41 | $libtool --mode=execute $psiconv -o $outputfile -Thtml4 $file |
44 | $libtool --mode=execute $psiconv -o $outputfile -Thtml4 -eASCII $file |
42 | done |
45 | done |
43 | |
46 | |
44 | echo "Going to produce the index..." |
47 | echo "Going to produce the index..." |
45 | ( |
48 | ( |
46 | cd $tempdir |
49 | cd $tempdir |