#10339: Simplify spkg/pipestatus
------------------------------+---------------------------------------------
Reporter: jdemeyer | Owner: GeorgSWeber
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6.1
Component: build | Keywords: pipestatus Makefile
Author: Jeroen Demeyer | Upstream: N/A
Reviewer: Leif Leonhardy | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by jhpalmieri):
* status: needs_review => needs_work
Comment:
I don't really care which version eventually gets used, but especially
since this issue is being debated here, it's crucial that the behavior of
pipestatus with regard to a command like `pipestatus "A && B" "C"` be
documented, say in the message at the beginning of that file or in the
comments following that, or both.
{{{
if [ $# -ne 2 ] || [ -z "$1" -o -z "$2" ]; then
echo >&2 "Usage: $0 CMD1 CMD2"
echo >&2 "Run two commands in a pipeline 'CMD1 | CMD2' and exit"
echo >&2 "with the exit status of CMD1, *not* that of CMD2."
echo >&2 "MAYBE ADD SOMETHING HELPFUL HERE"
exit 2
}}}
Or here:
{{{
# Run two commands in a pipeline and exit with the exit status of the
# first command, not the second.
# This is useful, for example, in a makefile, where we tee the output
# ....
# Note that if you run
# pipestatus "A && B" "C"
# then ...
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10339#comment:31>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.