| 1 | # Copyright 1999-2006 Gentoo Foundation |
1 | # Copyright 1999-2006 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/eutils.eclass,v 1.262 2006/11/12 00:29:48 kanaka Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.263 2006/11/13 20:58:41 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # This eclass is for general purpose functions that most ebuilds |
5 | # This eclass is for general purpose functions that most ebuilds |
| 6 | # have to implement themselves. |
6 | # have to implement themselves. |
| 7 | # |
7 | # |
| 8 | # NB: If you add anything, please comment it! |
8 | # NB: If you add anything, please comment it! |
| … | |
… | |
| 755 | # Simple script to replace 'dos2unix' binaries |
755 | # Simple script to replace 'dos2unix' binaries |
| 756 | # vapier@gentoo.org |
756 | # vapier@gentoo.org |
| 757 | # |
757 | # |
| 758 | # edos2unix(file, <more files> ...) |
758 | # edos2unix(file, <more files> ...) |
| 759 | edos2unix() { |
759 | edos2unix() { |
| 760 | for f in "$@" |
760 | echo "$@" | xargs sed -i 's/\r$//' |
| 761 | do |
|
|
| 762 | cp "${f}" ${T}/edos2unix |
|
|
| 763 | sed 's/\r$//' ${T}/edos2unix > "${f}" |
|
|
| 764 | done |
|
|
| 765 | } |
761 | } |
| 766 | |
762 | |
| 767 | |
763 | |
| 768 | ############################################################## |
764 | ############################################################## |
| 769 | # START: Handle .desktop files and menu entries # |
765 | # START: Handle .desktop files and menu entries # |