From: Mike Frysinger Date: Fri, 30 Sep 2011 16:51:01 +0000 (+0000) Subject: edos2unix now dies when sed fails X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=20afb9da12ae5224fe4dd5fcf451d687b7449008;p=gentoo.git edos2unix now dies when sed fails --- diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 92490ff96729..ac6f6849490b 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.365 2011/09/29 02:32:20 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.366 2011/09/30 16:51:01 vapier Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -919,7 +919,8 @@ enewgroup() { # is a script based solution. Just give it a list of files to convert and # they will all be changed from the DOS CRLF format to the UNIX LF format. edos2unix() { - echo "$@" | xargs sed -i 's/\r$//' + [[ $# -eq 0 ]] && return 0 + sed -i 's/\r$//' -- "$@" || die } # Make a desktop file !