autopkg / hansen-m-recipes

My recipes for Autopkg - https://github.com/autopkg
27 stars 50 forks source link

Link in Mega.download recipe is outdated for macOS 15.15 + add URLProvider script to get up to date download links #173

Closed oliverweinm closed 4 years ago

oliverweinm commented 4 years ago

The link currently used (_https://www.megasoftware.net/releases/MEGA7.0.21_mac32_setup.dmg_) in the recipe com.github.hansen-m.download.mega is hardcoded and only downloads MEGA version 7.0.21

This version is outdated and is not supported on macOS Catalina and higher, which can only run 64-bit programs now.

A python script which would scrape this page for the latest update to MEGA: https://www.megasoftware.net/history, create a download link in this format: _https://www.megasoftware.net/do_force_download/MEGAX_xx.x.x_installer.pkg_ and return it to the URLDownloader processor in the Mega.download.recipe can keep the recipe up to date, without having to change the download link for every new version.

rustymyers commented 4 years ago

Hey! I think we could add a URL text search looking for the first 'MEGA X version' match should be able to pull out that version: (April 2020) MEGA X version 10.1.8 build 10200331

This URL might also work well: https://www.megasoftware.net/releases/MEGAX_10.1.8_installer.pkg

oliverweinm commented 4 years ago

Hey @rustymyers thanks for the quick response. That would be a totally valid approach here.

When I come across a situation like this, I usually like to create a a python script (in an override repo I help maintain) for a new processor which uses a regex to fetch the current version from a webpage, formats a correct download string (this part can be really ugly in some download links) and returns it for the URLDownloader to use.

In fact, I already wrote one for this specific repo.

How about I make a pull request and you take a look at it and see if you like the changes I made?

rustymyers commented 4 years ago

Sure, sounds good. Thanks!

oliverweinm commented 4 years ago

Hi @rustymyers I don't want to leave you waiting for long, however the webpage of the developer megasoftware.net is currently down (problem with the DNS server) and prevents me from testing my code before I can make the pull request. (I've already written to the developer about this)

oliverweinm commented 4 years ago

Hey @rustymyers Just made the pull request: https://github.com/autopkg/hansen-m-recipes/pull/174

rustymyers commented 4 years ago

Resolved in latest pull request #174