findTarball: Handle pipefail

It was failing because the bash subshell died with SIGPIPE, which is
no longer ignored.

http://hydra.nixos.org/build/16766452
This commit is contained in:
Eelco Dolstra
2014-11-05 18:24:16 +01:00
parent 83758d2b26
commit c964077200
6 changed files with 16 additions and 11 deletions
+11 -6
View File
@@ -1,11 +1,16 @@
findTarballs() {
findTarball() {
local suffix i
test -d "$1/tarballs/" && {
if [ -f "$1" ]; then
echo "$1"
return
fi
if [ -d "$1/tarballs/" ]; then
for suffix in tar.gz tgz tar.bz2 tbz2 tar.xz tar.lzma; do
for i in $1/tarballs/*.$suffix; do echo $i; done
done | sort
}
echo "$1"
for i in $1/tarballs/*.$suffix; do echo $i; return; done
done | sort | head -1
return
fi
return 1
}
canonicalizeJarManifest() {