Michel Fortin wrote:
The objection (if any) was mostly about "/usr/local/dmd/osx/bin"
vs /usr/local/bin, but using /usr/local/{dmd,dmd2} should be OK.

I was thinking about using /usr/local/{dmd,dmd2} and then create symlinks to /usr/local/bin. But that will create problems with the dmd.conf because it also needs a symlink in /usr/local/bin and then the conf file for dmd and dmd1 will conflict.

The solution is to create a "symlink program" and drop it in /usr/local/bin. I know it works; I wrote one to do just that:

    #include <unistd.h>

    int main(unsigned int argc, char **argv) {
        argv[0] = "/usr/local/dmd/osx/bin/dmd";
        execv("/usr/local/dmd/osx/bin/dmd", argv);
    }

I did that for my linux package, but used shell instead.
Then the dmd.conf was a link back to the real config file,
to /etc/dmd.conf for dmd and to /etc/dmd2.conf for dmd2...

/usr/bin/dmd2 -> /usr/libexec/dmd2/dmd
/usr/libexec/dmd2/dmd.conf -> /etc/dmd2.conf
Then the conf files didn't conflict anymore.

--anders

Reply via email to