<p></p>
<p><b>@eht16</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2590#discussion_r717965162">scripts/gtk-bundle-from-msys2.sh</a>:</p>
<pre style='color:#555'>> @@ -135,7 +137,8 @@ _getpkg() {
        if [ "$use_cache" = "yes" ]; then
                package_info=$(pacman -Qi mingw-w64-$ABI-$1)
                package_version=$(echo "$package_info" | grep "^Version " | cut -d':' -f 2 | tr -d '[[:space:]]')
-               ls $cachedir/mingw-w64-${ABI}-${1}-${package_version}-* | sort -V | tail -n 1
+               # use @(gz|xz|zst) to filter out signature files (e.g. mingw-w64-x86_64-...-any.pkg.tar.zst.sig)
+               ls $cachedir/mingw-w64-${ABI}-${1}-${package_version}-*.tar.@(gz|xz|zst) | sort -V | tail -n 1
</pre>
<p>For me, it doesn't work:</p>
<div class="highlight highlight-source-shell"><pre>enrico@endor:/tmp/shglob$ ls
test-1.tar.zst
enrico@endor:/tmp/shglob$ ls test-<span class="pl-k">*</span>.tar.{gz,xz,zst}
ls: cannot access <span class="pl-s"><span class="pl-pds">'</span>test-*.tar.gz<span class="pl-pds">'</span></span>: No such file or directory
ls: cannot access <span class="pl-s"><span class="pl-pds">'</span>test-*.tar.xz<span class="pl-pds">'</span></span>: No such file or directory
 test-1.tar.zst
enrico@endor:/tmp/shglob$ <span class="pl-c1">shopt</span> -s extglob
enrico@endor:/tmp/shglob$ ls test-<span class="pl-k">*</span>.tar.<span class="pl-k">@</span>(gz<span class="pl-k">|</span>xz<span class="pl-k">|</span>zst)
test-1.tar.zst</pre></div>
<p><code>*.tar.{gz,xz,zst}</code> tries to expand to all of the patterns and so fails for missing files. The <code>extglob</code> variant only matches for <em>existing</em> files.<br>
I don't see a big issue here, we already require <code>bash</code> anyway and performance is also not that relevant as probably nearly all other operations in the script are way more expensive.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2590#discussion_r717965162">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ6PCRJW3YGWSNBJZTTUEIVCZANCNFSM4RTUWQYA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ6DJNDGGTO33D6VTRDUEIVCZA5CNFSM4RTUWQYKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFWT2SVA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2590#discussion_r717965162",
"url": "https://github.com/geany/geany/pull/2590#discussion_r717965162",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>