From e7fa483b0782aa2f5bc6cbe39d2be2aea85d48de Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Mon, 30 Sep 2024 13:04:19 -0700 Subject: [PATCH] devel/pyoxidizer: Correctly locate just one already-downloaded PyOxidizer binary Taking the first line never worked as intended, as the input from echo was never multi-line but space-separated words. orz Reverse version sort for good measure to use the newest version instead of oldest if we have more than one (which was how I ran into this bug in the first place). --- devel/pyoxidizer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devel/pyoxidizer b/devel/pyoxidizer index c4bb2699..83b407e9 100755 --- a/devel/pyoxidizer +++ b/devel/pyoxidizer @@ -29,7 +29,7 @@ main() { locate() { # Locate existing local copy of pyoxidizer. - echo "$devel"/pyoxidizer-[0-9]*_"$(platform-machine)"?(.exe) | head -n1 + printf '%s\n' "$devel"/pyoxidizer-[0-9]*_"$(platform-machine)"?(.exe) | sort --reverse --version-sort | head -n1 } download() {