diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-11 08:21:39 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-11 08:21:39 +0000 |
commit | ad5e5d32f30f3dc3829dbf99452c6b472d51f473 (patch) | |
tree | 7a58ed57d9d112e007c1389731b010fd8b973b22 | |
parent | 453c3a1b7a5568d0a06f2c77c86fd098e9af39ba (diff) | |
download | portage-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-x | bin/dosed | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |