From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 03A1E1381F4 for ; Sun, 12 Aug 2012 19:05:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9C38E062C; Sun, 12 Aug 2012 19:05:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9A7AEE062C for ; Sun, 12 Aug 2012 19:05:01 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 091E61B4028 for ; Sun, 12 Aug 2012 19:05:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CD5BBE5444 for ; Sun, 12 Aug 2012 19:04:58 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1344797274.47ac46c0c64ac7d13c3c1e460891ae52352e4eea.sping@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: ChangeLog genkernel X-VCS-Directories: / X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 47ac46c0c64ac7d13c3c1e460891ae52352e4eea X-VCS-Branch: master Date: Sun, 12 Aug 2012 19:04:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 28ef4c4e-f677-4351-9672-f6b8d38dbb83 X-Archives-Hash: 30ae43ff16bb68a9aae0416ed7b589ee commit: 47ac46c0c64ac7d13c3c1e460891ae52352e4eea Author: Sebastian Pipping pipping org> AuthorDate: Sun Aug 12 18:43:02 2012 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Sun Aug 12 18:47:54 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=47ac46c0 Fix parsing of --config=... command line option Before, --config=... could not be combined with anything else on the command line --- ChangeLog | 3 +++ genkernel | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79a318b..bee9ecb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 12 Aug 2012; Sebastian Pipping genkernel: + Fix parsing of --config=... command line option + 27 Jul 2012; Sebastian Pipping defaults/initrd.scripts, genkernel: Bump version to 3.4.40 diff --git a/genkernel b/genkernel index 5ee2d42..98f24d9 100755 --- a/genkernel +++ b/genkernel @@ -25,11 +25,12 @@ parse_opt() { # We don't know where our config is, so we check for it, and default to using # /etc/genkernel.conf if nobody has specified one. -case "$*" in - --config=*) - CMD_GK_CONFIG=`parse_opt "$*"` - ;; -esac + +# NOTE: We are look for --config=... in a way that doesn't modify $@ since we access that again, later +for (( i=1; i<=$# ; i=i+1 )); do + eval arg="\$$i" + [[ "${arg}" = --config=* ]] && CMD_GK_CONFIG=`parse_opt "${arg}"` +done # Pull in our configuration _GENKERNEL_CONF=${CMD_GK_CONFIG:-/etc/genkernel.conf}