From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6226A139085 for ; Mon, 2 Jan 2017 22:27:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3E13E0D8C; Mon, 2 Jan 2017 22:27:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9295BE0D2B for ; Mon, 2 Jan 2017 22:27:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ABF0A341016 for ; Mon, 2 Jan 2017 22:27:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4FB9124EF for ; Mon, 2 Jan 2017 22:27:00 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1483395103.bcedd62696efcef13d537d240f9add87336192a0.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_configkernel.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: bcedd62696efcef13d537d240f9add87336192a0 X-VCS-Branch: master Date: Mon, 2 Jan 2017 22:27:00 +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: cdea4b18-035b-4cd1-8e9a-d7d75c3a6b37 X-Archives-Hash: b78349c60b3aa5948dffc585f426f2dd commit: bcedd62696efcef13d537d240f9add87336192a0 Author: Robin H. Johnson gentoo org> AuthorDate: Mon Jan 2 22:11:43 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon Jan 2 22:11:43 2017 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=bcedd626 gen_configkernel: function to fetch variable. Signed-off-by: Robin H. Johnson gentoo.org> gen_configkernel.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index 390a6da..d050296 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -32,6 +32,13 @@ determine_config_file() { fi } +function kconfig_get_opt() { + kconfig="$1" + optname="$2" + sed -n "${kconfig}" \ + -e "/^#\? \?${optname}[ =].*/{ s/.*${optname}[ =]//g; s/is not set//g; p; q }" +} + function kconfig_set_opt() { kconfig="$1" optname="$2"