From 376d71e65320b50a81093fa6047b475efc7c2395 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Mon, 28 Aug 2023 12:42:42 +0200 Subject: [PATCH] ci/profiles.sh: fix case matching logic '-' 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 3cd8fa387..e58b61d50 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 ;; -- 2.47.2