# less 406
# ========
# Slackware 8.1's 'less' package includes version 374, 9.0 and 9.1's include
# 381, 10.0, 10.1, and 10.2's include 382, and 11.0's and 12.0's include 394
#
# 9.0 and up include a lesspipe.sh script written by Patrick Volkerding
# (the author of Slackware). Below I include a different one with support
# for more types of files (more as of the last time I checked).
# If you ever want to uninstall less, or clean up files from an old version
# before installing a new one, skip down to the bottom for instructions.
# lesspipe 1.53
# =============
# lesspipe.sh is a script that less can use to let you do funky things like
# this:
# less ~/tarball.tar.bz2
# (that does the same as running 'tar tjvf ~/tarball.tar.bz2 | less')
# This will set it up with support for utils that are installed on your
# system. To include support for everything (if you're planning on
# installing all of those utils later), pass --yes to configure instead of
# --default. To be prompted for everything individually, just run configure
# by itself.
cd
test -f installed/lesspipe-1.53.tar.gz && mv installed/lesspipe-1.53.tar.gz .
test ! -f lesspipe-1.53.tar.gz &&
wget http://www-zeuthen.desy.de/~friebel/unix/less/lesspipe-1.53.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "lesspipe-*" -exec rm -r {} \;
tar xzvf ~/lesspipe-1.53.tar.gz
cd lesspipe-1.53
test $UID = 0 && chown -R root:root .
chmod -R u+w .
./configure --default
# To activate lesspipe.sh (if you use bash), run this:
export LESSOPEN="|lesspipe.sh %s"
# To activate it on boot-up from now on, add that line to your /etc/profile
# (It's probably already in there), or create a /etc/profile.d/lesspipe.sh
# with that line in it.
# If you ever want to uninstall less, this should do it:
cd
su
test -d src/less-* && ( cd src/less-* ; make uninstall )
( cd /usr/bin ; rm -f less lessecho lesskey )
( cd /usr/man/man1 ; rm -f less.1 lessecho.1 lesskey.1 )
exit
find ~/src -maxdepth 1 -type d -name "less-*" -exec rm -r {} \;
rm -f ~/installed/less-*.tar.*
# If you ever want to uninstall lesspipe, this should do it:
cd
su
test -d src/lesspipe-* && ( cd src/lesspipe-* ; make uninstall )
( cd /usr/local/bin ; rm -f code2color lesspipe.sh )
rm -f /usr/local/man/man1
exit
find ~/src -maxdepth 1 -type d -name "lesspipe-*" -exec rm -r {} \;
rm -f ~/installed/lesspipe-*.tar.*