diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-07-26 15:16:40 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-07-26 15:16:40 +0000 |
commit | b520c7f9c455f830abf91067f448e997275d4bf4 (patch) | |
tree | c56791a2016c77debb76a262fa36639d36fd4c88 | |
parent | f0ac6d13b8ba9b04f8ab8a35f9dec331c63d366b (diff) | |
download | crosstool-ng-b520c7f9c455f830abf91067f448e997275d4bf4.tar.gz crosstool-ng-b520c7f9c455f830abf91067f448e997275d4bf4.tar.bz2 crosstool-ng-b520c7f9c455f830abf91067f448e997275d4bf4.zip |
Backport #864 from trunk:
Limit printing the error message only in the top-level shell.
/branches/1.2/scripts/functions | 2 2 0 0 ++
1 file changed, 2 insertions(+)
-rw-r--r-- | scripts/functions | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions index c37a0c72..cc2f3003 100644 --- a/scripts/functions +++ b/scripts/functions @@ -5,6 +5,8 @@ # Prepare the fault handler CT_OnError() { ret=$? + # Bail out early in subshell, the upper level shell will act accordingly. + [ ${BASH_SUBSHELL} -eq 0 ] || exit $ret CT_DoLog ERROR "Build failed in step '${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}'" for((step=(CT_STEP_COUNT-1); step>1; step--)); do CT_DoLog ERROR " called in step '${CT_STEP_MESSAGE[${step}]}'" |