projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
453c3a1
)
Fix exit code to return non-zero when an error occurs. Thanks to Christoph
author
Zac Medico
<zmedico@gentoo.org>
Thu, 11 Dec 2008 08:21:39 +0000
(08:21 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 11 Dec 2008 08:21:39 +0000
(08:21 -0000)
Mende <angelos@g.o> for reporting.
svn path=/main/trunk/; revision=12202
bin/dosed
patch
|
blob
|
history
diff --git
a/bin/dosed
b/bin/dosed
index 5ae09b7ed5e66888b8b48d61c185fb7daf3e0728..97fca715fdd82af9a84f5760ccea18eb7bb88bfd 100755
(executable)
--- a/
bin/dosed
+++ b/
bin/dosed
@@
-3,6
+3,7
@@
# Distributed under the terms of the GNU General Public License v2
# $Id$
+ret=0
mysed="s:${D}::g"
for x in "$@" ; do
@@
-11,10
+12,13
@@
for x in "$@" ; do
if [ -f "${y}" ] ; then
sed -i -e "${mysed}" "${y}"
else
- echo "${y} is not a regular file!"
- exit 1
+ echo "${y} is not a regular file!"
>&2
+ false
fi
+ ((ret+=$?))
else
mysed="${x}"
fi
done
+
+exit $ret