Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: file pattern support for tar command #156

Open
Kalmalyzer opened this issue Apr 12, 2020 · 2 comments
Open

enhancement: file pattern support for tar command #156

Kalmalyzer opened this issue Apr 12, 2020 · 2 comments

Comments

@Kalmalyzer
Copy link
Contributor

I would like to use desync tar to upload parts of the result from a build process. I can do so today, by copying parts of the build process output to a temp directory, and then performing desync tar on the whole tree. It would however be preferable to skip that copying step.

Looking a bit at the current implementation, it seems that the tar & untar commands create some sort of local filesystem representation at the specified location. One syntax that could make sense is something along the lines of desync tar <output file> <source base folder> [globbing patterns] where, if no globbing patterns are included, all files will be captured.

Example: desync tar result.catar input input/binaries/* input/readme.txt would capture the binaries subtree and the readme.txt file from the input folder and put it into result.catar.

Does the above feature design make sense? Would you take a PR for this?

@folbricht
Copy link
Owner

Think this may work if you change the syntax a bit. desync won't let you put disjoint trees into a catar, but I imagine adding an --include <pattern> and/or --exclude <pattern> could perhaps act as a filter while keeping a single root of the tree. The patterns would have to be relative to the root of the tree as well. Does that sound reasonable and match what you're trying to do? I won't have time to implement it the next couple of weeks at least, but will take PRs if you have something.

@Kalmalyzer
Copy link
Contributor Author

--include <pattern> and/or --exclude <pattern> would make sense, yes. I'll let you know in case I get around to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants