$Id: INSTALL,v 1.7 2003/06/20 08:52:57 ianmacd Exp $

Prerequisites
-------------

acoc has just one prerequisite (other than Ruby itself, of course), namely the
Term::ANSIColor module. You can obtain a copy of this module here:

  http://raa.ruby-lang.org/list.rhtml?name=ansicolor

If you don't want to go to the trouble of fetching and installing
Term::ANSIColor yourself, you can install the version that comes with acoc. In
this case, type:

$ make extra

and then follow the rest of the installation steps detailed below.

acoc has been tested and verified to work with Ruby 1.6.8 and 1.8 snapshots.


Minimal installation
--------------------

Type:

$ make install

You can now use acoc to run external commands, e.g. top(1) and w(1):

$ acoc command [arg1 .. argN]


Advanced installation
---------------------

acoc works best when invoked from a symlink named after the command that you
wish it to call. It will detect that it was invoked from a symlink and call
the real program whose name was used to run it.

This works best when a special directory is created solely for the purpose of
holding these symlink and placed at the start of your $PATH. /usr/acoc/bin is
recommended for this purpose.

Create /usr/acoc/bin and then add symlinks to it as follows. Assuming you
installed acoc as /usr/bin/acoc, the commands would look like this:

mkdir /usr/acoc/bin
cd /usr/acoc/bin
ln -s ../../bin/acoc rpmbuild
ln -s ../../bin/acoc traceroute
ln -s ../../bin/acoc ping
ln -s ../../bin/acoc w

etc.

Please note that the path to any commands for which you create symlinks should
be in your $PATH, or acoc will be unable to locate them. For example, if you
add a symlink for ping as above, /bin should be in your $PATH.

Next, you need to add /usr/acoc/bin to your path. For Bourne shell (derived)
users, the command is this:

PATH=/usr/acoc/bin:${PATH}

For csh users, the command looks like this:

set path = ( /usr/acoc/bin $path )

(If you use a Red Hat Linux [or similar] system, place the provided acoc.sh
and acoc.csh scripts in /etc/profile.d, from where they will be sourced when
an interactive shell is opened.)

Now, when you run rpmbuild, acoc will notice that it was invoked from a
symlink, it will remove /usr/acoc/bin (the symlink's directory) from the path
in its environment, and then call the real rpmbuild, which will be located
according to the remaining directories in its path.
