[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Wrapper script

Hi everyone,

I ITP a package that provides a single binary that expects its input
file named in a special way, and writes two files with fixed names. One
of those is only temporary and not really usefull, so one usually
deletes it. I thought of writing a wrapper script, so the user can give
the input and output filename, the renaming would be done by the script,
as well as taking care of not overriding files if they already exist.

Are there any guideline how this is done? I've seen packages using
"foo.bin" for the original binary and "foo" for the wrapper script, or
some using a different location such as /usr/lib/foo/bin for the binary.
Or should one leave the binary as "foo" to provide the know behavior and
use "foo-wrapper" for the script?

I'd also be glad if you could point me out to some good source of how to
use /tmp in a secure way in scripts; I'd like to run the binary there
because I'm not a fan of joking around in the filesystem. (IIRC, tools
like pdfjam do so as well.)

Any advise would be very welcome!

Best regards,

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply to: