# 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.3 2004/06/25 00:39:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.4 2004/12/10 23:17:11 johnm Exp $
#
# Author John Mylchreest <johnm@gentoo.org>
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} || \
die "sed ${1} failed"
}