[Github-comments] [geany/geany] Windows cross, GTK3 and x86_64 build preparations (#2590)

Colomban Wendling notifications at xxxxx
Wed Oct 6 20:16:09 UTC 2021


@b4n commented on this pull request.



> @@ -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

if it is really a concern, grep can be your friend.  Either `| grep -E '[.](gz|xz|zst)$'`, or the possibly simpler and safer `| grep -v '[.]sig$'`.

PS: or, as I wouldn't miss an opportunity of dropping some sed in: `| sort -rV | sed '/[.]sig$/d;q'` ;)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2590#discussion_r723643354
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211006/0d0a7e3f/attachment.htm>


More information about the Github-comments mailing list