Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting "newest" file not great for .ZIPs with variable digit count in version #59

Open
fat-tire opened this issue Sep 5, 2024 · 0 comments

Comments

@fat-tire
Copy link
Owner

fat-tire commented Sep 5, 2024

Consider two semantically versioned files:

DaVinci_Resolve_Studio_19.0.1_Linux.zip
DaVinci_Resolve_Studio_19.0_Linux.zip

If both files are being considered to be installed, the current sort will select the 9.0 version, as it thinks it is "newer" than the one with the third digit. Essentially 19.0 should be treated as 19.0.0, and ranked below 19.0.1 not above, which will require a change to this line:

      export ZIPNAME=`ls -1rt DaVinci_Resolve_*_Linux.zip | sort -n | tail -1`

This should also be able to accommodate files starting with DaVinci_Resolve_* and DaVinci_Resolve_Studio_*.

Dunno if there's a ready made solution for BASH (I don't want to rely on anything else being installed on the host) for sorting files with three version numbers like this, but before I go on a quest to solve it-- anyone know a simple, easy fix (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant