/[gentoo-x86]/eclass/fixheadtails.eclass
Gentoo

Diff of /eclass/fixheadtails.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.3 2004/06/25 00:39:48 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/fixheadtails.eclass,v 1.4 2004/12/10 23:17:11 johnm Exp $
4# 4#
5# Author John Mylchreest <johnm@gentoo.org> 5# Author John Mylchreest <johnm@gentoo.org>
6 6
7ECLASS=fixheadtails 7ECLASS=fixheadtails
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
17# to be used for specific files. ie: ht_fix_file "${FILESDIR}/mypatch.patch" 17# to be used for specific files. ie: ht_fix_file "${FILESDIR}/mypatch.patch"
18 18
19do_sed_fix() { 19do_sed_fix() {
20 sed -i \ 20 sed -i \
21 -e 's/head -\(.*\)/head -n \1/' \ 21 -e 's/head -\(.*\)/head -n \1/' \
22 -e 's/tail \([-+]\)\(.*\)c/tail -c \1\2/' \
22 -e 's/tail \([-+]\)\(.*\)/tail -n \1\2/' ${1} || \ 23 -e 's/tail \([-+]\)\(.*\)/tail -n \1\2/' ${1} || \
23 die "sed ${1} failed" 24 die "sed ${1} failed"
24} 25}
25 26
26ht_fix_file() { 27ht_fix_file() {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20