What is the best way to add an executable to one of a computer's $PATH directories? I am writing an installation script, and know that the names of the PATH directories can vary, as do the directories' permissions, so what is the best way to do basically the following:
$ addtopath myexectuable