1 |
Author: zmedico |
2 |
Date: 2010-01-29 18:45:59 +0000 (Fri, 29 Jan 2010) |
3 |
New Revision: 15238 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.7/bin/ebuild-helpers/doins |
7 |
Log: |
8 |
Fix it so an empty directory given to doins -r does not trigger failure. |
9 |
(trunk r15172) |
10 |
|
11 |
Modified: main/branches/2.1.7/bin/ebuild-helpers/doins |
12 |
=================================================================== |
13 |
--- main/branches/2.1.7/bin/ebuild-helpers/doins 2010-01-29 18:45:49 UTC (rev 15237) |
14 |
+++ main/branches/2.1.7/bin/ebuild-helpers/doins 2010-01-29 18:45:59 UTC (rev 15238) |
15 |
@@ -63,16 +63,12 @@ |
16 |
} |
17 |
|
18 |
_xdoins() { |
19 |
- local -i success=0 failed=0 |
20 |
+ local -i failed=0 |
21 |
while read -d $'\0' x ; do |
22 |
_doins "$x" "${x%/*}" |
23 |
- if [[ $? -eq 0 ]] ; then |
24 |
- ((success|=1)) |
25 |
- else |
26 |
- ((failed|=1)) |
27 |
- fi |
28 |
+ ((failed|=$?)) |
29 |
done |
30 |
- [[ $failed -ne 0 || $success -eq 0 ]] && return 1 || return 0 |
31 |
+ return $failed |
32 |
} |
33 |
|
34 |
success=0 |
35 |
@@ -109,6 +105,9 @@ |
36 |
find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \; |
37 |
find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins |
38 |
if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then |
39 |
+ # NOTE: Even if only an empty directory is installed here, it |
40 |
+ # still counts as success, since an empty directory given as |
41 |
+ # an argument to doins -r should not trigger failure. |
42 |
((success|=1)) |
43 |
else |
44 |
((failed|=1)) |