summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1997-12-20 19:20:33 +0000
committerwosch <wosch@FreeBSD.org>1997-12-20 19:20:33 +0000
commit62ece1adce424ae0cd9266dc2068d1d360da139a (patch)
treea640b7edee6be162aece891ae2feffa0e6c35553 /gnu
parent3bedd0364b3438855308123bbfdb306215ae7f0b (diff)
downloadFreeBSD-src-62ece1adce424ae0cd9266dc2068d1d360da139a.zip
FreeBSD-src-62ece1adce424ae0cd9266dc2068d1d360da139a.tar.gz
Added zgrep.libz. This version of zgrep(1) depend on a
grep(1) linked with libz.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gzip/Makefile11
-rw-r--r--gnu/usr.bin/gzip/zgrep.libz18
2 files changed, 27 insertions, 2 deletions
diff --git a/gnu/usr.bin/gzip/Makefile b/gnu/usr.bin/gzip/Makefile
index 77eb4a6..6529e5e 100644
--- a/gnu/usr.bin/gzip/Makefile
+++ b/gnu/usr.bin/gzip/Makefile
@@ -1,5 +1,5 @@
# @(#)Makefile 5.3 (Berkeley) 5/12/90
-# $Id: Makefile,v 1.14 1997/02/22 15:45:54 peter Exp $
+# $Id: Makefile,v 1.15 1997/06/29 06:03:28 pst Exp $
PROG= gzip
SRCS= gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c \
@@ -17,13 +17,20 @@ LINKS+= ${BINDIR}/zgrep ${BINDIR}/zfgrep
LINKS+= ${BINDIR}/zdiff ${BINDIR}/zcmp
NOSHARED?=yes
+GREP_LIBZ?= YES
+.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
+ZGREP=zgrep.libz
+.else
+ZGREP=zgrep.getopt
+.endif
+
beforeinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/zforce ${.CURDIR}/gzexe ${.CURDIR}/znew \
${.CURDIR}/zmore ${.CURDIR}/zdiff \
${DESTDIR}${BINDIR}
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/zgrep.getopt ${DESTDIR}${BINDIR}/zgrep
+ ${.CURDIR}/${ZGREP} ${DESTDIR}${BINDIR}/zgrep
match.o: ${.CURDIR}/match.S
$(CPP) ${.CURDIR}/match.S >_match.s
diff --git a/gnu/usr.bin/gzip/zgrep.libz b/gnu/usr.bin/gzip/zgrep.libz
new file mode 100644
index 0000000..07d5267
--- /dev/null
+++ b/gnu/usr.bin/gzip/zgrep.libz
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Copyright (c) Dec 1997 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
+# Public Domain.
+#
+# zgrep - Search possibly compressed files for a regular expression. This
+# version of zgrep(1) depend on a grep(1) linked with libz.
+#
+# $Id$
+
+PATH=/bin:/usr/bin; export PATH
+
+case "$0" in # grep variant
+ *egrep) grep=${EGREP-egrep};;
+ *fgrep) grep=${FGREP-fgrep};;
+ *) grep=${GREP-grep};;
+esac
+
+exec ${grep} -Z "$@"
OpenPOWER on IntegriCloud