summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-30 16:51:01 +0000
committerMike Frysinger <vapier@gentoo.org>2011-09-30 16:51:01 +0000
commit20afb9da12ae5224fe4dd5fcf451d687b7449008 (patch)
tree68235d42d65e2306ccd9902422a89ed3c85d4c04 /eclass/eutils.eclass
parentTweak edos2unix invocation to avoid passing non-existent files. (diff)
downloadhistorical-20afb9da12ae5224fe4dd5fcf451d687b7449008.tar.gz
historical-20afb9da12ae5224fe4dd5fcf451d687b7449008.tar.bz2
historical-20afb9da12ae5224fe4dd5fcf451d687b7449008.zip
edos2unix now dies when sed fails
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass5
1 files changed, 3 insertions, 2 deletions
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 !