1 |
Author: zmedico |
2 |
Date: 2008-02-06 06:08:51 +0000 (Wed, 06 Feb 2008) |
3 |
New Revision: 9278 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/ebuild.sh |
7 |
Log: |
8 |
Make qa_source and qa_call save the return value and return it. Thanks |
9 |
to igli for suggesting. |
10 |
|
11 |
|
12 |
Modified: main/trunk/bin/ebuild.sh |
13 |
=================================================================== |
14 |
--- main/trunk/bin/ebuild.sh 2008-02-05 21:29:15 UTC (rev 9277) |
15 |
+++ main/trunk/bin/ebuild.sh 2008-02-06 06:08:51 UTC (rev 9278) |
16 |
@@ -33,22 +33,26 @@ |
17 |
|
18 |
qa_source() { |
19 |
local shopts=$(shopt) OLDIFS="$IFS" |
20 |
- source "$@" || return 1 |
21 |
+ local retval |
22 |
+ source "$@" |
23 |
+ retval=$? |
24 |
[[ $shopts != $(shopt) ]] && |
25 |
eqawarn "QA Notice: Global shell options changed and were not restored while sourcing '$*'" |
26 |
[[ "$IFS" != "$OLDIFS" ]] && |
27 |
eqawarn "QA Notice: Global IFS changed and was not restored while sourcing '$*'" |
28 |
- return 0 |
29 |
+ return $retval |
30 |
} |
31 |
|
32 |
qa_call() { |
33 |
local shopts=$(shopt) OLDIFS="$IFS" |
34 |
- "$@" || return 1 |
35 |
+ local retval |
36 |
+ "$@" |
37 |
+ retval=$? |
38 |
[[ $shopts != $(shopt) ]] && |
39 |
eqawarn "QA Notice: Global shell options changed and were not restored while calling '$*'" |
40 |
[[ "$IFS" != "$OLDIFS" ]] && |
41 |
eqawarn "QA Notice: Global IFS changed and was not restored while calling '$*'" |
42 |
- return 0 |
43 |
+ return $retval |
44 |
} |
45 |
|
46 |
# subshell die support |
47 |
|
48 |
-- |
49 |
gentoo-commits@l.g.o mailing list |