zsync2 icon indicating copy to clipboard operation
zsync2 copied to clipboard

zsyncmake2 output path support

Open lalten opened this issue 1 year ago • 4 comments

Original zsyncmake supports -o outputfile which is very handy for scripting: https://linux.die.net/man/1/zsyncmake#:~:text=finished%20downloading%20it).-,%2Do%20outputfile,-Override%20the%20default

https://github.com/th-in-gs/zsync/blob/d1558117e264df7f779e99624fc8a6732b571c9f/make.c#L549-L555

Would be great for zsyncmake2 to support this feature as well.

lalten avatar Apr 08 '24 15:04 lalten

What would be a use case for wanting a different file name than the default one?

probonopd avatar Apr 08 '24 18:04 probonopd

In my case I'm calling zsyncmake2 from a Bazel run target. Path setups are kind of important in the Bazel world. Currently, every invocation of running zsyncmake2 will clutter up the runfiles dir of all future invocations. For reasons I won't go into detail here about the directory where you launch the program will not and can not be the working directory during execution.

lalten avatar Apr 08 '24 18:04 lalten

I see. Would the ability to just specify a different path (but not filename) be sufficient for your use case?

probonopd avatar Apr 09 '24 06:04 probonopd

That would be not ideal (because I still need to write logic around the call to calculate what the output filename will be so it can be used elsewhere afterwards) -- but better than the status quo (where I have to hardcode implementation details for path assumptions).

lalten avatar Apr 09 '24 08:04 lalten