Magic runs on top of Ant. Before installing Magic you need to build or download a binary installation of Ant (version 1.6.1 or later).
Magic registers content in a common repository. If you want to share the repository with Merlin you should define the AVALON_HOME environment variable with a value pointing to a directory within which the repository will be created. If undefined, the installation will create a private repository in central/system/.cache.
From your the root avalon/truck checkout directory...
$ ant setup
The above command invokes the ant file central/system/setup/setup.xml which downloads the magic library and installs this under ${user.home}/.ant/lib. It also checks for the presence of Junit libraries and will download these if required.
From your the root avalon/truck checkout directory...
$ ant