diff options
author | adamw <adamw@FreeBSD.org> | 2003-04-21 10:03:05 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2003-04-21 10:03:05 +0800 |
commit | c42b8c7b9592b80da859df63aed1fa90bc230761 (patch) | |
tree | f39785cc6ad80bd7318e956f9b2c7d0765e3f369 /sysutils | |
parent | b376a9c71c5790c9217cdc7e2694e755116bbafd (diff) | |
download | freebsd-ports-gnome-c42b8c7b9592b80da859df63aed1fa90bc230761.tar.gz freebsd-ports-gnome-c42b8c7b9592b80da859df63aed1fa90bc230761.tar.zst freebsd-ports-gnome-c42b8c7b9592b80da859df63aed1fa90bc230761.zip |
Add chgrep.
Chgrep searches the input files (or standard input if no files are named)
for oldstring and changes them to new string. If some file and file.lock
exist then chgrep leaves both files unchanged. This program can be very use-
full for mail servers. Chgrep is fast, much faster than grep or sed.
PR: 51198
Submitted by: Kirill Ponomarew <ponomarew@oberon.net>
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/chgrep/Makefile | 26 | ||||
-rw-r--r-- | sysutils/chgrep/distinfo | 1 | ||||
-rw-r--r-- | sysutils/chgrep/files/patch-src::chgrep.c | 14 | ||||
-rw-r--r-- | sysutils/chgrep/pkg-descr | 6 | ||||
-rw-r--r-- | sysutils/chgrep/pkg-plist | 1 |
6 files changed, 49 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 1b7ecc3b8280..176b689e7bb4 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -36,6 +36,7 @@ SUBDIR += cfengine SUBDIR += cfengine2 SUBDIR += checkservice + SUBDIR += chgrep SUBDIR += clockspeed SUBDIR += cmdwatch SUBDIR += colorize diff --git a/sysutils/chgrep/Makefile b/sysutils/chgrep/Makefile new file mode 100644 index 000000000000..f2df98763090 --- /dev/null +++ b/sysutils/chgrep/Makefile @@ -0,0 +1,26 @@ +# Ports collection makefile for: chgrep +# Date created: April 20, 2003 +# Whom: Kirill Ponomarew <ponomarew@oberon.net> +# +# $FreeBSD$ +# + +PORTNAME= chgrep +PORTVERSION= 1.1.0 +CATEGORIES= sysutils +MASTER_SITES= http://www.bmk.bicom.pl/chgrep/ +EXTRACT_SUFX= .tgz + +MAINTAINER= ponomarew@oberon.net +COMMENT= Fast string substitution across multiple files + +GNU_CONFIGURE= yes +USE_GMAKE= yes + +MAN1= chgrep.1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/chgrep ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/man/chgrep.1 ${MANPREFIX}/man/man1 + +.include <bsd.port.mk> diff --git a/sysutils/chgrep/distinfo b/sysutils/chgrep/distinfo new file mode 100644 index 000000000000..1344aa8f32aa --- /dev/null +++ b/sysutils/chgrep/distinfo @@ -0,0 +1 @@ +MD5 (chgrep-1.1.0.tgz) = 4822ae4efc6590ed9fb231cea4f14f16 diff --git a/sysutils/chgrep/files/patch-src::chgrep.c b/sysutils/chgrep/files/patch-src::chgrep.c new file mode 100644 index 000000000000..cbe5b8c55615 --- /dev/null +++ b/sysutils/chgrep/files/patch-src::chgrep.c @@ -0,0 +1,14 @@ +--- src/chgrep.c.orig Sun Apr 20 22:58:09 2003 ++++ src/chgrep.c Sun Apr 20 22:58:18 2003 +@@ -132,11 +132,6 @@ + file_quit = NULL; + tmpfile_quit = NULL; + +- if (recursive) { +- ftw(argv[opttmp], list, sysconf(_SC_OPEN_MAX)); +- return 0; +- } +- + if ( ! istmpfilename) { /* if we don't use -t filename.tmp */ + strcat(strcpy(tmpfile, argv[opttmp]), ".lock"); + if ( (fdout = open(tmpfile, O_RDONLY, PERM)) != -1) { diff --git a/sysutils/chgrep/pkg-descr b/sysutils/chgrep/pkg-descr new file mode 100644 index 000000000000..2aa7ed9869d9 --- /dev/null +++ b/sysutils/chgrep/pkg-descr @@ -0,0 +1,6 @@ +Chgrep searches the input files (or standard input if no files are named) +for oldstring and changes them to new string. If some file and file.lock +exist then chgrep leaves both files unchanged. This program can be very use- +full for mail servers. Chgrep is fast, much faster than grep or sed. + +WWW: http://www.bmk.bicom.pl/chgrep diff --git a/sysutils/chgrep/pkg-plist b/sysutils/chgrep/pkg-plist new file mode 100644 index 000000000000..c5c9af47ca07 --- /dev/null +++ b/sysutils/chgrep/pkg-plist @@ -0,0 +1 @@ +bin/chgrep |