I wrote a simple script to automate my DMD installs. If the zipfile is named
dmd.2.047.zip it will install the data into /opt/dmd-2.047 and then create the
symbolic link /opt/dmd2 (I have /opt/dmd2/bin in my path). I also have it copy
my dmd.conf from the previous install, since I'm not using the standard
dmd.conf. I'll comment that line out in the script below:
#!/bin/bash
OSDIR=osx
SRCDIR=`pwd`
VERSION=$1
if [ -z "$1" ]
then
echo "Usage: $0 zipfile"
exit 1
fi
rm -fr dmd2
unzip dmd.$VERSION.zip
pushd /opt
sudo mkdir dmd-$VERSION
cd dmd-$VERSION
sudo cp -r $SRCDIR/dmd2/* .
sudo ln -s $OSDIR/bin
sudo ln -s $OSDIR/lib
cd bin
sudo chmod a+x dmd dumpobj obj2asm rdmd shell
#sudo cp /opt/dmd2/bin/dmd.conf .
cd /opt
sudo rm dmd2
sudo ln -s dmd-$VERSION dmd2
popd