summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-11 08:21:39 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-11 08:21:39 +0000
commitad5e5d32f30f3dc3829dbf99452c6b472d51f473 (patch)
tree7a58ed57d9d112e007c1389731b010fd8b973b22
parent453c3a1b7a5568d0a06f2c77c86fd098e9af39ba (diff)
downloadportage-ad5e5d32f30f3dc3829dbf99452c6b472d51f473.tar.gz
portage-ad5e5d32f30f3dc3829dbf99452c6b472d51f473.tar.bz2
portage-ad5e5d32f30f3dc3829dbf99452c6b472d51f473.zip
Fix exit code to return non-zero when an error occurs. Thanks to Christoph
Mende <angelos@g.o> for reporting. svn path=/main/trunk/; revision=12202
-rwxr-xr-xbin/dosed8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/dosed b/bin/dosed
index 5ae09b7ed..97fca715f 100755
--- 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