public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nikita Maslov <wkernelteam@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] scripts: setlocalversion: remove quotes around localversion from config
Date: Fri, 14 Jan 2022 00:26:30 +0300	[thread overview]
Message-ID: <40d76a4e-e888-c1ef-aa0a-af19392fd4f6@gmail.com> (raw)

From: Nikita Maslov <wkernelteam@gmail.com>
Date: Fri, 14 Jan 2022 00:13:39 +0300
Subject: [PATCH] scripts: setlocalversion: remove quotes around 
localversion from config

After replacing of include/config/auto.conf sourcing with
extraction of CONFIG_LOCALVERSION, resulting version string
contains quotes around localversion part which are always
present in auto.conf (even if localversion is empty).

This patch fixes this script so it removes quotes now.

Signed-off-by: Nikita Maslov <wkernelteam@gmail.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Tom Rini <trini@konsulko.com>
---

  scripts/setlocalversion | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index c1c0435267..4a63143706 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -153,8 +153,9 @@ if test -e include/config/auto.conf; then
         # We are interested only in CONFIG_LOCALVERSION and
         # CONFIG_LOCALVERSION_AUTO, so extract these in a safe
         # way (i.e. w/o sourcing auto.conf)
-       CONFIG_LOCALVERSION=`cat include/config/auto.conf | awk -F '=' 
'/^CONFIG_LOCALVERSION=/ {print $2}'`
-       CONFIG_LOCALVERSION_AUTO=`cat include/config/auto.conf | awk -F 
'=' '/^CONFIG_LOCALVERSION_AUTO=/ {print $2}'`
+       # xargs echo removes quotes
+       CONFIG_LOCALVERSION=`cat include/config/auto.conf | awk -F '=' 
'/^CONFIG_LOCALVERSION=/ {print $2}' | xargs echo`
+       CONFIG_LOCALVERSION_AUTO=`cat include/config/auto.conf | awk -F 
'=' '/^CONFIG_LOCALVERSION_AUTO=/ {print $2}' | xargs echo`
  else
         echo "Error: kernelrelease not valid - run 'make prepare' to 
update it" >&2
         exit 1
--

             reply	other threads:[~2022-01-14  3:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13 21:26 Nikita Maslov [this message]
2022-01-21 15:20 ` [PATCH] scripts: setlocalversion: remove quotes around localversion from config Simon Glass
2022-01-24 21:03 ` Tom Rini

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=40d76a4e-e888-c1ef-aa0a-af19392fd4f6@gmail.com \
    --to=wkernelteam@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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