From 77fd37781045c9a95190ac9ea40a6fd2bbed51b1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 12 Dec 2008 21:40:50 +0000 Subject: [PATCH] Fix exit code to return non-zero when an error occurs. Thanks to Christoph Mende for reporting. (trunk r12202) svn path=/main/branches/2.1.6/; revision=12235 --- bin/dosed | 8 ++++++-- 1 file 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 -- 2.26.2