Make qa_source and qa_call save the return value and return it. Thanks
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Feb 2008 06:08:51 +0000 (06:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Feb 2008 06:08:51 +0000 (06:08 -0000)
to igli for suggesting.

svn path=/main/trunk/; revision=9278

bin/ebuild.sh

index 61799ad88cb046b2373ecfd2a37991d83b4815b3..8601863a03da9440287d14f569ab677f5ce6d72e 100755 (executable)
@@ -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