summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/less/Makefile2
-rw-r--r--usr.bin/less/lesspipe.sh13
2 files changed, 15 insertions, 0 deletions
diff --git a/usr.bin/less/Makefile b/usr.bin/less/Makefile
index d9dd968..22b03bf 100644
--- a/usr.bin/less/Makefile
+++ b/usr.bin/less/Makefile
@@ -5,6 +5,8 @@ SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c command.c decode.c \
edit.c filename.c forwback.c help.c ifile.c input.c jump.c line.c \
linenum.c lsystem.c mark.c optfunc.c option.c opttbl.c os.c output.c \
position.c prompt.c search.c signal.c tags.c ttyin.c version.c
+SCRIPTS=lesspipe.sh
+SCRIPTSNAME=lesspipe.sh
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
LINKS= ${BINDIR}/less ${BINDIR}/more
diff --git a/usr.bin/less/lesspipe.sh b/usr.bin/less/lesspipe.sh
new file mode 100644
index 0000000..2cef2c5
--- /dev/null
+++ b/usr.bin/less/lesspipe.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+# ex:ts=8
+
+# $FreeBSD$
+
+case "$1" in
+ *.Z) uncompress -c $1 2>/dev/null
+ ;;
+ *.gz) gzip -d -c $1 2>/dev/null
+ ;;
+ *.bz2) bzip2 -d -c $1 2>/dev/null
+ ;;
+esac
OpenPOWER on IntegriCloud