- fix clang detection loop: apt-cache search prints 'name - desc', so use awk field 1 (not 2) and strip the clang- prefix from the loop variable

This commit is contained in:
w.pomp committed 2026-10-29 13:22:35 +01:00
1 parent 120453582c
commit aadf235ca5
1 file changed
+2 -1
+2 -1
View File
@@ -48,7 +48,8 @@ jobs:
sudo apt update
sudo apt install -y build-essential cmake
NEWEST=""
for v in $(apt-cache search '^clang-[0-9]+$' | awk '{print $2}' | sort -rn); do
for name in $(apt-cache search '^clang-[0-9]+$' | awk '{print $1}' | sort -rV); do
v=${name#clang-}
if sudo apt-get install --dry-run -y "clang-$v" "llvm-$v" "lld-$v" "libclang-$v-dev" >/dev/null 2>&1; then
NEWEST=$v
break