June 26, 2007
I wrote similar script centuries ago, and is still available on http://dejan.lekic.googlepages.com/install-dmd . I use it regularly for installing DMD on any GNU/Linux. I did not try it on some UNIX, but I guess it will work. The script knows what to do when root executes it (it does system-wide installation of DMD), and also when user executes it (it installs DMD inside users HOME, and sets up DFLAGS).

Kind regards