diff options
author | chinsan <chinsan@FreeBSD.org> | 2008-01-26 09:55:53 +0800 |
---|---|---|
committer | chinsan <chinsan@FreeBSD.org> | 2008-01-26 09:55:53 +0800 |
commit | c6c77e1b5891ef6bf4c3bbb75d0bc9c83a2cc833 (patch) | |
tree | 0c8ea4ebb9f9500dec9afaeb76623e5188e4a96d /devel | |
parent | caa4ed8c480ba76d43147c00b53e90494af01163 (diff) | |
download | freebsd-ports-graphics-c6c77e1b5891ef6bf4c3bbb75d0bc9c83a2cc833.tar.gz freebsd-ports-graphics-c6c77e1b5891ef6bf4c3bbb75d0bc9c83a2cc833.tar.zst freebsd-ports-graphics-c6c77e1b5891ef6bf4c3bbb75d0bc9c83a2cc833.zip |
pipestatus - source file for POSIX shell that allows
to obtain an exit status of every program in a pipe.
MOTIVATION
When we program in shell we often run pipes like this
prog1 args1 | prog2 args2 | ... | progN argsN
POSIX says that exit status of pipe is the exit status of LAST program
in it, i.e. progN in our example. That is, exit status of all other
programs in pipe is silently ignored. But in many situations exit
status of all programs in pipe should be checked to make program
robust. Some shells like BASH and ZSH have special extensions for
doing this but POSIX shell unfortunately doesn't provide an EASY way
for doing this.
In order to solve the problem, described above pipestatus was written.
WWW: http://sourceforge.net/projects/pipestatus/
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/pipestatus/Makefile | 35 | ||||
-rw-r--r-- | devel/pipestatus/distinfo | 3 | ||||
-rw-r--r-- | devel/pipestatus/pkg-descr | 20 |
4 files changed, 59 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 98aa0206e29..6aecfef9241 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1872,6 +1872,7 @@ SUBDIR += pikdev SUBDIR += piklab SUBDIR += pinstall + SUBDIR += pipestatus SUBDIR += pkg-config SUBDIR += plan9port SUBDIR += pmake diff --git a/devel/pipestatus/Makefile b/devel/pipestatus/Makefile new file mode 100644 index 00000000000..3ba8676d50b --- /dev/null +++ b/devel/pipestatus/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: pipestatus +# Date created: 2008/01/26 +# Whom: chinsan +# +# $FreeBSD$ +# + +PORTNAME= pipestatus +PORTVERSION= 0.4.0 +CATEGORIES= devel +MASTER_SITES= SF + +MAINTAINER= chinsan@FreeBSD.org +COMMENT= UNIX/POSIX shell helper for running pipes safely + +NO_BUILD= yes + +PLIST_FILES= bin/pipestatus +.if !defined(NOPORTDOCS) +PLIST_DIRS= ${DOCSDIR_REL} +PLIST_FILES+= ${DOCSDIR_REL}/README \ + ${DOCSDIR_REL}/NEWS +.endif +DOCS= README NEWS + +do-install: + ${INSTALL_DATA} ${WRKSRC}/pipestatus ${DESTDIR}${PREFIX}/bin/ +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for doc in ${DOCS} + ${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR} +.endfor +.endif + +.include <bsd.port.mk> diff --git a/devel/pipestatus/distinfo b/devel/pipestatus/distinfo new file mode 100644 index 00000000000..b45aa2636e8 --- /dev/null +++ b/devel/pipestatus/distinfo @@ -0,0 +1,3 @@ +MD5 (pipestatus-0.4.0.tar.gz) = 66ea501dd753d06a8fab8cf5f523ec73 +SHA256 (pipestatus-0.4.0.tar.gz) = 77e901c59d624bf51c417677e2d9b7f70fd5d490362e8a5f46c6ef5893feaa55 +SIZE (pipestatus-0.4.0.tar.gz) = 5358 diff --git a/devel/pipestatus/pkg-descr b/devel/pipestatus/pkg-descr new file mode 100644 index 00000000000..ddcde0b6c5f --- /dev/null +++ b/devel/pipestatus/pkg-descr @@ -0,0 +1,20 @@ +pipestatus - source file for POSIX shell that allows +to obtain an exit status of every program in a pipe. + + MOTIVATION + +When we program in shell we often run pipes like this + + prog1 args1 | prog2 args2 | ... | progN argsN + +POSIX says that exit status of pipe is the exit status of LAST program +in it, i.e. progN in our example. That is, exit status of all other +programs in pipe is silently ignored. But in many situations exit +status of all programs in pipe should be checked to make program +robust. Some shells like BASH and ZSH have special extensions for +doing this but POSIX shell unfortunately doesn't provide an EASY way +for doing this. + +In order to solve the problem, described above pipestatus was written. + +WWW: http://sourceforge.net/projects/pipestatus/ |