[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: current working file name in gschemrc



(Apologies for top-posting)

Postscript is passed to the standard input of the print command, which is run using popen().  It uses the default shell 'sh' to run the command.

I think that the sort of behaviour you're looking for might be best achieved by writing some sort of wrapper program that accepts Postscript on stdin and a destination filename as its argument.

           Peter

-- 
Peter Brett <peter@xxxxxxxxxxxxx>
Remote Sensing Research Group
Surrey Space Centre

----- Original message -----
> Now, I got stuck with the next step: Copy the pdf produced by cups-pdf in
> $HOME/PDF to the working directory of the current project. Seems like 
> adding bash commands to the print command works. E.g. 
> ÂÂÂ lp -d PDF -t "mosfet-node"; echo "foobar"
> or even
> ÂÂÂ lp -d PDF -t "mosfet-node"; ls -l $HOME
> Output is on stdout. The dot expands correctly to the current working
> directory. 
> 
> But if I try to access the produced pdf file with 
> ÂÂÂ lp -d PDF -t "mosfet-node"; mv $HOME/PDF/mosfet-node.pdf .
> the second command seems to act on the state before the print command.
> If  there was no PDF file before, I get:
> ÂÂÂ mv: cannot stat `/home/kmk/mosfet-node.pdf': No such file or directory
> If there was such a file, then this file gets copied rather then the
> newly produced one. It acts, as if the shell that executes the command
> string does not wait for the lp command to terminate before it proceeds
> with the mv.
> 
> Is there anything I can do about this? 
> What kind of shell is the command string executed by?
> 



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user