Skip to content

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

@fat-tire

Description

@fat-tire

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 (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions