[comp.unix.questions] Tool Capsules

cl@datlog.co.uk (Charles Lambert) (03/12/88)

There have been several occasions when I've wanted a program to know where
it was invoked from,  and never found a satisfactory way.  Two examples:

    1.  A user-interface tool that dispatches other tools.  For security,
	I'd like the interface tool to dispatch it's helpers from the
	same installation directory,  without having to hard-code the
	path into it.  That way,  I would have a "tool capsule" that can
	be installed anywhere without the risk of people putting Trojan
	Horses (tools with the same name that do something naughty) in the
	path.

    2.  Self-documenting shell scripts.  If a shell script new where it was,
	it could use its own commentary as online documentation.

Has anyone implemented successful schemes like this?

---------------
Charles Lambert