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 8A7B0139086 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 CC349E0D2B; 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 A3C43E0D2C for ; Mon, 2 Jan 2017 22:27:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 BCD05341027 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 615E2261C 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: <1483395209.a94d0bbf1c7338691fde2cbf5768fd843c267bb0.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_configkernel.sh gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: a94d0bbf1c7338691fde2cbf5768fd843c267bb0 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: 1b7826e7-f443-4968-bdbd-51bdf806c9d3 X-Archives-Hash: 6aae9ec2f41626a356ddfc2254e98e1e commit: a94d0bbf1c7338691fde2cbf5768fd843c267bb0 Author: Robin H. Johnson gentoo org> AuthorDate: Mon Jan 2 22:13:29 2017 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon Jan 2 22:13:29 2017 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=a94d0bbf funcs: kconfig_*opt functions can be used for busybox as well. Signed-off-by: Robin H. Johnson gentoo.org> gen_configkernel.sh | 16 ---------------- gen_funcs.sh | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index d050296..f746dba 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -32,22 +32,6 @@ 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" - optval="$3" - sed -i "${kconfig}" \ - -e "s/^#\? \?${optname}[ =].*/${optname}=${optval}/g" \ - || gen_die "Failed to set ${optname}=${optval} in $kconfig" -} - config_kernel() { determine_config_file cd "${KERNEL_DIR}" || gen_die 'Could not switch to the kernel directory!' diff --git a/gen_funcs.sh b/gen_funcs.sh index 1bdaa7b..d669548 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -535,3 +535,19 @@ find_kernel_binary() { cd "${curdir}" echo "${tmp_kernel_binary}" } + +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" + optval="$3" + sed -i "${kconfig}" \ + -e "s/^#\? \?${optname}[ =].*/${optname}=${optval}/g" \ + || gen_die "Failed to set ${optname}=${optval} in $kconfig" +}