AppImageCommunity / zsync2

Rewrite of https://github.com/AppImage/zsync-curl, using modern C++, providing both a library and standalone tools.
Other
132 stars 25 forks source link

zsyncmake2 output path support #73

Open lalten opened 5 months ago

lalten commented 5 months ago

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.

probonopd commented 5 months ago

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

lalten commented 5 months ago

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.

probonopd commented 5 months ago

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

lalten commented 5 months ago

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).