Writing a custom download strategy from scratch? #574
-
Hi, I'm looking into creating a cask for a program that only distributes binaries through Mega.nz. I thought about processing the package elsewhere in a build step, but I figured it'd be best to use a custom download strategy. My only question is, will I need to write it from scratch, and if so, are there any examples I can follow? The only requirement is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Check out https://rubydoc.brew.sh/AbstractFileDownloadStrategy.html and its subclasses. Mostly what you'd need to do is properly implement |
Beta Was this translation helpful? Give feedback.
Check out https://rubydoc.brew.sh/AbstractFileDownloadStrategy.html and its subclasses. Mostly what you'd need to do is properly implement
fetch
by usingcached_location
,symlink_location
, andtemporary_path
correctly. Note that this would likely not be accepted into Homebrew itself, so you'd have to host this cask or formula in your own tap: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap