diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-02-09 09:18:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-02-09 09:18:52 +0000 |
commit | 4bb099550ddc4c4f7c4c6aa4e83783854f267311 (patch) | |
tree | 1d859b6620983e36a68aa5f5d13d9940dbdb0e75 /bin | |
parent | 86acaf2cc974a2154aac561ef5e4ada0dd2b9382 (diff) | |
download | portage-4bb099550ddc4c4f7c4c6aa4e83783854f267311.tar.gz portage-4bb099550ddc4c4f7c4c6aa4e83783854f267311.tar.bz2 portage-4bb099550ddc4c4f7c4c6aa4e83783854f267311.zip |
Make qa_source and qa_call save the return value and return it. Thanks
to igli for suggesting. (trunk r9278)
svn path=/main/branches/2.1.2/; revision=9304
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index eca24c626..37a9a6ed2 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -33,22 +33,26 @@ fi qa_source() { local shopts=$(shopt) OLDIFS="$IFS" - source "$@" || return 1 + local retval + source "$@" + retval=$? [[ $shopts != $(shopt) ]] && eqawarn "QA Notice: Global shell options changed and were not restored while sourcing '$*'" [[ "$IFS" != "$OLDIFS" ]] && eqawarn "QA Notice: Global IFS changed and was not restored while sourcing '$*'" - return 0 + return $retval } qa_call() { local shopts=$(shopt) OLDIFS="$IFS" - "$@" || return 1 + local retval + "$@" + retval=$? [[ $shopts != $(shopt) ]] && eqawarn "QA Notice: Global shell options changed and were not restored while calling '$*'" [[ "$IFS" != "$OLDIFS" ]] && eqawarn "QA Notice: Global IFS changed and was not restored while calling '$*'" - return 0 + return $retval } # subshell die support |