chiark / gitweb /
bin/mdw-build: Discard `tar' errors when searching for `.../RELEASE'.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 7 Jan 2012 15:58:49 +0000 (15:58 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 7 Jan 2012 15:58:49 +0000 (15:58 +0000)
GNU `tar' reports a vague `write error' as a result of the broken pipe
caused by the following `grep' finding a successful match.  This isn't
useful.  In our case, we don't care about this, since either we've found
the file anyway (so we're happy) or we didn't (in which case we'll fail
anyway).

The report, which makes its way to stderr even in quiet mode, is
worrying until you learn to ignore it, at which point it may hide a more
serious problem.

bin/mdw-build

index 9e5129834db71be14861f038c06af347aea98b31..d8be79578ee8af0970955e064c9a3b0d17f87f3a 100755 (executable)
@@ -246,7 +246,7 @@ esac
 
 cd $releasepath
 
-if ! tar tfz $buildpath/$distdir.tar.gz | grep -q RELEASE; then
+if ! tar tf $buildpath/$distdir.tar.gz 2>/dev/null | grep -q RELEASE; then
   fail "missing RELEASE file in distribution"
 fi