Installing a program on Linux: providing a short command

Posted by rwallace on Super User See other posts from Super User or by rwallace
Published on 2010-05-30T16:33:05Z Indexed on 2010/05/30 16:43 UTC
Read the original article Hit count: 290

Filed under:
|
|

Suppose you're distributing a program to run on Linux, call it Foo, and the program executable is called foo.exe (because it's a CLR program so it runs under Mono) and it needs a couple of DLLs in the same directory and maybe a later version might need some data files that it reads on startup and whatever, so relocating it to a global bin directory is a bit of hassle and it really prefers to remain in its original directory...

But the user would prefer to invoke the program by typing foo instead of mono /path/to/foo.exe.

What's the best/most usual way to provide such a short command? Can/should an install script/makefile create a one line script called foo that invokes the full path, and put the one line script in a global bin directory? If so, what should be the target bin directory, and are there any directions about exactly how to do this? Or is there a preferred alternative?

© Super User or respective owner

Related posts about linux

Related posts about mono