1 |
vapier 08/03/24 21:58:30 |
2 |
|
3 |
Modified: openrc-9999.ebuild |
4 |
Log: |
5 |
handle module arguments |
6 |
(Portage version: 2.2_pre5) |
7 |
|
8 |
Revision Changes Path |
9 |
1.5 sys-apps/openrc/openrc-9999.ebuild |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.5&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.5&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?r1=1.4&r2=1.5 |
14 |
|
15 |
Index: openrc-9999.ebuild |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v |
18 |
retrieving revision 1.4 |
19 |
retrieving revision 1.5 |
20 |
diff -u -r1.4 -r1.5 |
21 |
--- openrc-9999.ebuild 24 Mar 2008 07:30:18 -0000 1.4 |
22 |
+++ openrc-9999.ebuild 24 Mar 2008 21:58:30 -0000 1.5 |
23 |
@@ -1,6 +1,6 @@ |
24 |
# Copyright 1999-2008 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.4 2008/03/24 07:30:18 vapier Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.5 2008/03/24 21:58:30 vapier Exp $ |
28 |
|
29 |
inherit eutils flag-o-matic multilib toolchain-funcs |
30 |
|
31 |
@@ -135,13 +135,24 @@ |
32 |
v=${f##*/} |
33 |
v=${v#kernel-} |
34 |
v=${v//[^[:alnum:]]/_} |
35 |
- ( |
36 |
- printf "\n### START: Auto-converted from ${f##*/}\n\n" |
37 |
- sed \ |
38 |
- -e "/^[^#]/s:^\(.*\)$:modules_${v}=\"\${modules_${v}} \1\":" \ |
39 |
- "${f}" |
40 |
- printf "\n### END: Auto-converted from ${f##*/}\n\n" |
41 |
- ) >> "${D}"/etc/conf.d/modules |
42 |
+ gawk -v v="${v}" -v f="${f##*/}" ' |
43 |
+ BEGIN { print "\n### START: Auto-converted from " f "\n" } |
44 |
+ { |
45 |
+ if ($0 ~ /^[^#]/) { |
46 |
+ print "modules_" v "=\"${modules_" v "} " $1 "\"" |
47 |
+ gsub(/[^[:alnum:]]/, "_", $1) |
48 |
+ printf "module_" $1 "_args=\"" |
49 |
+ for (i = 2; i <= NF; ++i) { |
50 |
+ if (i > 2) |
51 |
+ printf " " |
52 |
+ printf $i |
53 |
+ } |
54 |
+ print "\"\n" |
55 |
+ } else |
56 |
+ print |
57 |
+ } |
58 |
+ END { print "\n### END: Auto-converted from " f "\n" } |
59 |
+ ' "${f}" >> "${D}"/etc/conf.d/modules |
60 |
rm -f "${f}" |
61 |
done |
62 |
rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null |
63 |
|
64 |
|
65 |
|
66 |
-- |
67 |
gentoo-commits@l.g.o mailing list |