Skip to content

Efficiency and Accurate URLs #15

Description

@fitzmorrispr

I noticed that update.sh appears to always download the entire .deb file, only doing comparisons after the download completes. Given that these files are 200 MB plus, this seems inefficient.

Using curl -I to get just the headers for "https://zoom.us/client/latest/zoom_amd64.deb" reveals that the url is (of course) a 302 redirect, with the redirect location being:
https://cdn.zoom.us/prod/<version>/zoom_amd64.deb

so, running:
curl -I -s -o /dev/null -w "%header{location}\n" https://zoom.us/client/latest/zoom_amd64.deb
currently outputs:
https://cdn.zoom.us/prod/6.6.11.6052/zoom_amd64.deb
which can easily be parsed to get the version number by itself, and then compared to the version number of the file currently in the repo.
(of course, the \n should probably be left out when doing this in the script, since there's no need to store a newline in a variable)

I realize that 200 MB isn't all that much these days, but that doesn't mean that Zoom appreciates you hitting them for it 4 times a day, and certainly this is the better (and more performant!) approach.

the URL used for RStudio appears to be a 404, probably because it still says 'bionic'. Changing it to 'jammy' makes the above code have a similar result:

curl -I -s -o /dev/null -w "%header{location}\n" https://rstudio.org/download/latest/stable/desktop/jammy/rstudio-latest-amd64.deb
https://s3.amazonaws.com/rstudio-desktop/electron/jammy/amd64/rstudio-2025.09.2-418-amd64.deb

parsing out the version number from that string is not any more difficult, though it is slightly different.

Interestingly, the version number in the filename on your mirror is a match to this one, except with a + instead of a - before the version number for some reason?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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