From 1a7eb1654bac6d3ac92fcf251444dc80dea16204 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Thu, 4 Jun 2020 14:13:53 +0200 Subject: Rename get_current_kernel to get_selected_kernel In a similar vein to commit 5f83bed ("Use consistent and explicit terminology in set_kernel()"), the term "current" kernel is ambiguous here. An upcoming commit will introduce the concept of the "running config", which is the kernel configuration the currently running kernel uses. To reduce any ambiguity, use "selected" instead of "current". --- kern | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kern b/kern index d95ab9b..9c49ef7 100755 --- a/kern +++ b/kern @@ -26,18 +26,18 @@ get_latest_kernel() { eselect --brief kernel list | tail -n1 } -get_current_kernel() { +get_selected_kernel() { basename "$(eselect --brief kernel show 2>/dev/null)" } set_kernel() { kern=${1:-$(get_latest_kernel)} - current=$(get_current_kernel) + selected=$(get_selected_kernel) kerndir=$SRCDIR/$kern test -d "$kerndir" || errx "No such file or directory: $kerndir" - if test "$kern" = "$current"; then + if test "$kern" = "$selected"; then err "Warning: Latest kernel already selected: $kern" return fi -- cgit v1.2.3-2-gb3c3