diff options
author | Tuan Van <langthang@gentoo.org> | 2005-01-22 00:02:08 +0000 |
---|---|---|
committer | Tuan Van <langthang@gentoo.org> | 2005-01-22 00:02:08 +0000 |
commit | 76171867fedd167b145ea7bf5f8d300bc58196c1 (patch) | |
tree | 1c0fc65374ba009044603751038c693b67906510 /eclass | |
parent | Stable on alpha. (diff) | |
download | gentoo-2-76171867fedd167b145ea7bf5f8d300bc58196c1.tar.gz gentoo-2-76171867fedd167b145ea7bf5f8d300bc58196c1.tar.bz2 gentoo-2-76171867fedd167b145ea7bf5f8d300bc58196c1.zip |
new fixheadtails.eclass from johnm
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/fixheadtails.eclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/fixheadtails.eclass b/eclass/fixheadtails.eclass index b2825124aac8..92050426a7af 100644 --- a/eclass/fixheadtails.eclass +++ b/eclass/fixheadtails.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.4 2004/12/10 23:17:11 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.5 2005/01/22 00:02:08 langthang Exp $ # # Author John Mylchreest <johnm@gentoo.org> @@ -18,9 +18,9 @@ DEPEND="${DEPEND} >=sys-apps/sed-4" do_sed_fix() { sed -i \ - -e 's/head -\(.*\)/head -n \1/' \ - -e 's/tail \([-+]\)\(.*\)c/tail -c \1\2/' \ - -e 's/tail \([-+]\)\(.*\)/tail -n \1\2/' ${1} || \ + -e 's/head \+-\([0-9]\)/head -n \1/g' \ + -e 's/tail \+\([-+][0-9]\+\)c/tail -c \1/g' \ + -e 's/tail \+\([-+][0-9]\)/tail -n \1/g' ${1} || \ die "sed ${1} failed" } |