1
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?
edit: The approach of creating a one line script at install time seems to work well, here's the actual install script I ended up writing:
a@a-desktop:~/ayane$ cat install.sh
#!/bin/sh
echo mono `pwd`/ayane.exe '"$@"' >ayane
chmod +x ayane
mv ayane /usr/local/bin