public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger (vapier)" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/openrc: openrc-9999.ebuild
Date: Mon, 24 Mar 2008 21:58:30 +0000	[thread overview]
Message-ID: <E1JdugY-0004lL-S6@stork.gentoo.org> (raw)

vapier      08/03/24 21:58:30

  Modified:             openrc-9999.ebuild
  Log:
  handle module arguments
  (Portage version: 2.2_pre5)

Revision  Changes    Path
1.5                  sys-apps/openrc/openrc-9999.ebuild

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild?r1=1.4&r2=1.5

Index: openrc-9999.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- openrc-9999.ebuild	24 Mar 2008 07:30:18 -0000	1.4
+++ openrc-9999.ebuild	24 Mar 2008 21:58:30 -0000	1.5
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.4 2008/03/24 07:30:18 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-9999.ebuild,v 1.5 2008/03/24 21:58:30 vapier Exp $
 
 inherit eutils flag-o-matic multilib toolchain-funcs
 
@@ -135,13 +135,24 @@
 				v=${f##*/}
 				v=${v#kernel-}
 				v=${v//[^[:alnum:]]/_}
-				(
-				printf "\n### START: Auto-converted from ${f##*/}\n\n"
-				sed \
-					-e "/^[^#]/s:^\(.*\)$:modules_${v}=\"\${modules_${v}} \1\":" \
-					"${f}"
-				printf "\n### END: Auto-converted from ${f##*/}\n\n"
-				) >> "${D}"/etc/conf.d/modules
+				gawk -v v="${v}" -v f="${f##*/}" '
+				BEGIN { print "\n### START: Auto-converted from " f "\n" }
+				{
+					if ($0 ~ /^[^#]/) {
+						print "modules_" v "=\"${modules_" v "} " $1 "\""
+						gsub(/[^[:alnum:]]/, "_", $1)
+						printf "module_" $1 "_args=\""
+						for (i = 2; i <= NF; ++i) {
+							if (i > 2)
+								printf " "
+							printf $i
+						}
+						print "\"\n"
+					} else
+						print
+				}
+				END { print "\n### END: Auto-converted from " f "\n" }
+				' "${f}" >> "${D}"/etc/conf.d/modules
 				rm -f "${f}"
 			done
 			rmdir "${ROOT}"/etc/modules.autoload.d 2>/dev/null



-- 
gentoo-commits@lists.gentoo.org mailing list



             reply	other threads:[~2008-03-24 21:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-24 21:58 Mike Frysinger (vapier) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-16 20:47 [gentoo-commits] gentoo-x86 commit in sys-apps/openrc: openrc-9999.ebuild William Hubbs (williamh)
2013-07-26  2:05 William Hubbs (williamh)
2012-11-07 14:59 William Hubbs (williamh)
2012-10-31 23:43 William Hubbs (williamh)
2012-10-31 22:47 William Hubbs (williamh)
2012-09-28 21:18 William Hubbs (williamh)
2012-09-28 19:56 William Hubbs (williamh)
2009-06-08 12:27 Mike Frysinger (vapier)
2008-05-31  7:06 Mike Frysinger (vapier)
2008-03-26 20:12 Doug Klima (cardoe)
2008-03-25 12:57 Mike Frysinger (vapier)
2008-03-25 12:34 Mike Frysinger (vapier)
2008-03-25 12:26 Mike Frysinger (vapier)
2008-03-25  0:13 Mike Frysinger (vapier)
2008-03-25  0:07 Mike Frysinger (vapier)
2008-03-24  7:30 Mike Frysinger (vapier)
2008-03-23 17:40 Mike Frysinger (vapier)
2008-03-23  0:04 Mike Frysinger (vapier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JdugY-0004lL-S6@stork.gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox