INSTALL
=======
Execute the following commands (for a more detailed description see below):

  ./configure
or
  perl configure	#(if the program env is not in /usr/bin)
  cp lesspipe.sh /usr/local/bin
  LESSOPEN="|/usr/local/bin/lesspipe.sh %s"; export LESSOPEN  #(sh like shells)
or
  setenv LESSOPEN "|/usr/local/bin/lesspipe.sh %s"            #(csh, tcsh)

Detailed description
====================

Step 1 (optional)
-----------------
To verify a working system and to customize lesspipe.sh to your needs
recreate lesspipe.sh from lesspipe.sh.in by the command

  ./configure
or if env is not in /usr/bin then edit line 1 of configure or execute
perl configure
If you do not want to answer questions during the configure run, you can use
  ./configure --yes
This will generate a lesspipe.sh assuming that all helper programs are or will
be installed. Alternatively to generate a lesspipe.sh that is tailored to your
system you should use
  ./configure --default

Step 2 (install)
----------------
You can copy lesspipe.sh to any appropriate place.
Suggested location: /usr/local/bin/lesspipe.sh
For syntax highlighting to work you have to copy the perl script code2color as
well.

cp lesspipe.sh code2color /usr/local/bin

(alternatively you can execute: make install)

in addition for MacOS X users only:
If you want to take advantage of handling package directories (.pkg) and
bill of material files (.bom) you have to edit the magic file for file type
recognition. It usually resides in /etc/magic or /usr/share/magic. If you
do not have root access you can also create or edit the file ~/.magic
which is consulted by the 'file' command as well.
You have to add to that file a line

0       string  BOMStore        Mac OS X bill of materials (BOM) file

Step 3 (activate)
-----------------
To make use of the installed lesspipe.sh set the environment variable LESSOPEN:
I recommend to use the fully qualified path to avoid problems with other
scripts of the same name or with a changed search PATH:

LESSOPEN="|/usr/local/bin/lesspipe.sh %s"; export LESSOPEN  #(sh like shells)
setenv LESSOPEN "|/usr/local/bin/lesspipe.sh %s"	    #(csh, tcsh)

