Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74734C54EAA for ; Sun, 22 Jan 2023 14:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbjAVOOn (ORCPT ); Sun, 22 Jan 2023 09:14:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjAVOOj (ORCPT ); Sun, 22 Jan 2023 09:14:39 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735A6FF0A; Sun, 22 Jan 2023 06:14:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DC2F6CE0EC5; Sun, 22 Jan 2023 14:14:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CCC5C4339E; Sun, 22 Jan 2023 14:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674396875; bh=AmzoAcLy4rVEa77Srrddz7lY2JGQMKi8x97/XkEnqeI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PLLlojZsj6x7FqINSenhdIbYC7OHbmRHXOcA6JV2STTfF+QnTgBZL8qNlP573q0yU O+dSLE/V2X+z44PpM+BLmNKSOUEcShsLCbRgvq4mQ8qs/TOEv0gkOaLs8I1hsxdVt4 ezvO91yNvNgxD0iK5FhpnmCD+DNdLnRG4mNggGmZUJTn5QpSo51kSDdZbddndZxN+C hlFc3pU8oMygG2hJWE2XDpDxg6pA84Gd+gC7yItazOmZR/NEUhJK2EcwnynLjGXvpn 4XUlHe5NCCwsNjQAlV6taU3h7Yv6oSykSi3v9cETu+g1dxiBzzR/sR8VVofDfltGWS iym6csGpqZOWg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , Masahiro Yamada Subject: [PATCH 2/7] setlocalversion: simplify the construction of the short version Date: Sun, 22 Jan 2023 23:14:22 +0900 Message-Id: <20230122141428.115372-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230122141428.115372-1-masahiroy@kernel.org> References: <20230122141428.115372-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the --short option given, scm_version() prints "+". Just append it. Signed-off-by: Masahiro Yamada --- scripts/setlocalversion | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 3b31702b4a4a..5cdf409204aa 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -121,8 +121,7 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then # # If the variable LOCALVERSION is set (including being set # to an empty string), we don't want to append a plus sign. - scm=$(scm_version --short) - res="$res${scm:++}" + res="$res$(scm_version --short)" fi echo "$res" -- 2.34.1