aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-01-25 07:11:48 +0100
committerGuido Günther <agx@sigxcpu.org>2017-01-25 07:11:48 +0100
commit27c3fd41c4542c148119e75b07ea2b6d8632383a (patch)
tree1976570b7ec178bb5a71a2c40ef52ed984d9ee34
parent390d34aaf771cde8edba4230efc0cd72e8fd82a4 (diff)
git-pbuilder: preserve exit status
390d34aaf771cde8edba4230efc0cd72e8fd82a4 got the exit status of the set instead of pdebuild. To avoid printing another command use "set -e"
-rw-r--r--bin/git-pbuilder10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/git-pbuilder b/bin/git-pbuilder
index fef4d770..e34a8eaa 100644
--- a/bin/git-pbuilder
+++ b/bin/git-pbuilder
@@ -327,17 +327,17 @@ done
# Now we can finally run pdebuild. The quoting here is tricky, but this
# seems to pass everything through properly.
if [ no = "$GIT_PBUILDER_AUTOCONF" ] ; then
- set -x
+ set -e; set -x
pdebuild --pbuilder "$BUILDER" --debbuildopts "$DEBBUILDOPTS" \
"${PDEBUILDOPTS[@]}" -- "${OPTIONS[@]}"
- { set +x; } 2>/dev/null
+ { set +x; } 2>/dev/null; set +e
else
- set -x
+ set -e; set -x
pdebuild --buildresult "$OUTPUT_DIR" --pbuilder "$BUILDER" \
--debbuildopts "$DEBBUILDOPTS" "${PDEBUILDOPTS[@]}" -- "${OPTIONS[@]}"
- { set +x; } 2>/dev/null
+ { set +x; } 2>/dev/null; set +e
fi
-exit "$?"
+exit 0
# Documentation. Use a hack to hide this from the shell. Because of the
# above exit line, this should never be executed.