From: Zac Medico Date: Thu, 11 Dec 2008 08:21:39 +0000 (-0000) Subject: Fix exit code to return non-zero when an error occurs. Thanks to Christoph X-Git-Tag: v2.2_rc18~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad5e5d32f30f3dc3829dbf99452c6b472d51f473;p=portage.git Fix exit code to return non-zero when an error occurs. Thanks to Christoph Mende for reporting. svn path=/main/trunk/; revision=12202 --- 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