the title says it all really. When I run with a debug option, I get 
the output a bit below. To me the script seems incorrect and I've 
added a note where I think it fails (that's where it failed when I 
copied it and tried it separately)

The problem seems to be that it assumes that tgif will print to 
$outfile, but tgif just prints to the current catalog.

/C

        The file contains tgif format data.
Unable to convert from tgif to bmp
Unable to convert from tgif to gif
Unable to convert from tgif to jpg
Unable to convert from tgif to pbm
Unable to convert from tgif to pgm
        Converting it to png format.
Converter c-tor:
        from_file:      
/afs/md.kth.se/md/home/damek/chr/thesis/part3/images/part3/design_process2.tgo
        to_file_base: 
/tmp/lyx_tmpdir16613qSh6Ee/design_process216613Nf7y9C
        from_format:  tgif
        to_format:    png
build_script ... ready!
        Conversion script:
--------------------------------------
#!/bin/sh
infile='/afs/md.kth.se/md/home/damek/chr/thesis/part3/images/part3/design_process2.tgo'
infile_base='/afs/md.kth.se/md/home/damek/chr/thesis/part3/images/part3/design_process2'
outfile='/tmp/lyx_tmpdir16613qSh6Ee/gconvert016613gsx3D1.png'

tgif -print -png ${infile} ||
{
        'rm' -f ${outfile}
        exit 1
}

if [ ! -f ${outfile} ]; then
 ### It comes in here... thinks the file doesn't exist?
        if [ -f ${outfile}.0 ]; then
                'mv' -f ${outfile}.0 ${outfile}
                'rm' -f ${outfile}.?
        else
  ### Bails out here
                exit 1
        fi
fi

fromfile=${outfile}
tofile='/tmp/lyx_tmpdir16613qSh6Ee/design_process216613Nf7y9C.png'

'mv' -f ${fromfile} ${tofile} ||
{
        'cp' -f ${fromfile} ${tofile} ||
        {
                exit 1
        }
        'rm' -f ${fromfile}
}

--------------------------------------
Reading 
'/afs/md.kth.se/md/home/damek/chr/thesis/part3/images/part3/design_process2.tgo'...
XPM file [613x147] printed into 'design_process2.xpm'.
pnmtopng: 2 colors found
Image conversion failed.
Unable to find converted file!



-------



-- 
Christian Ridderström, +46-8-790 91 37           http://www.md.kth.se/~chr
Mechatronics lab, Dept. of Machine Design        http://www.md.kth.se


Reply via email to