From: Nikita Maslov Date: Thu, 13 Jan 2022 21:13:39 +0000 (+0300) Subject: scripts: setlocalversion: remove quotes around localversion from config X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=609177140bdc6c8f1ca46955c6117e4420620d27;p=u-boot.git 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 to remove quotes. Signed-off-by: Nikita Maslov Cc: Philipp Tomsich Cc: Tom Rini Reviewed-by: Simon Glass --- 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