From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS20473 45.76.80.0/20 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from mail.smrk.net (mail.smrk.net [45.76.87.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 34DBE1F452 for ; Mon, 28 Aug 2023 10:42:52 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=smrk.net header.i=@smrk.net header.a=rsa-sha256 header.s=20221002 header.b=b7CZiG5r; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smrk.net; s=20221002; t=1693219367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=q8n8EK1stpr2jiTDkygYm8VFNCsNEWKMFlIzBlSYe4o=; b=b7CZiG5roRI3/11O4tW5YS0Vc2p/fM2fD6qyi2qxh7sphJi4Cz8D2rNfJZkGpMXSJjXvcu ahD8rOVGGlBGqBZnFZrgj8c0xB3d1ugCG8SzkWSRYdvtWhsE7ejDhfML8CCI/wEOOPeQgv cha9RCkVEcjAH8MDY3cx7oLI4QuH//Dlj4gghV3UMBrFbw5S4VLDps3q5svkZep1gHtsGS 3EO0nom8WawQumyLMDUU4B+anY0IYFOHvRlKqfzt9+X2pbY/tZi1U0gapsbNMEXlRwNRvY WcuFQsDhHKUA1CsbJrlAw+v/xL58PPgYnKBFmJGMUyc4LWeH0HuA0BhA81F/tA== Received: from localhost ( [192.168.5.2]) by smrk (OpenSMTPD) with ESMTPSA id 6c8a9721 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 28 Aug 2023 12:42:47 +0200 (CEST) From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= To: meta@public-inbox.org Subject: [PATCH 1/5] ci/profiles.sh: fix case matching logic Date: Mon, 28 Aug 2023 12:42:42 +0200 Message-ID: <20230828104246.936281-1-stepnem@smrk.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: '-' could never match, remove that alternative (it might have been a typo of '--', but that is already covered by '*--|--*' ('*' matches the null string)). Replace '*--*' with the equivalent '*' ('--' is always present). It would seem clearer to just replace the whole case command with something like '[ "$ID" -a "$VERSION_ID" ] && break' (or the POSIX-non-deprecated equivalent '[ "$ID" ] && [ "$VERSION_ID" ]' ); I assume a preference of using case here (e.g., to avoid syscall overhead in case [ is not implemented as a shell builtin (which seems far-fetched given the context, though)). --- ci/profiles.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/profiles.sh b/ci/profiles.sh index 3cd8fa38756a..e58b61d50a13 100755 --- a/ci/profiles.sh +++ b/ci/profiles.sh @@ -30,8 +30,8 @@ GNU/Linux) esac case $ID--$VERSION_ID in - -|*--|--*) continue ;; - *--*) break ;; + *--|--*) continue ;; + *) break ;; esac done ;; base-commit: a036772bdf732d4779f44974095bfdd0b30271ef -- 2.42.0