RKrahl / archive-tools

Tools for managing archives
Apache License 2.0
1 stars 2 forks source link

archive-tool check should use the archive's basedir as default for the files argument #45

Closed RKrahl closed 4 years ago

RKrahl commented 4 years ago

The archive-tool check command requires at least two positional arguments (unless the --stdin flag is used), archive and files. This should be changed such that the files argument is optional. If not provided, the base directory from the archive should be taken as the default.

E.g. assume an archive foo.tar.gz having the base directory foo. At the moment, the command

$ archive-tool check foo.tar.gz foo

will check if all files in foo are in the archive. Omitting the files argument yields an error:

$ archive-tool check foo.tar.gz 
usage: archive-tool [-h] {create,verify,ls,info,check,diff,find} ...
archive-tool: error: either --stdin or the files argument is required

This should be changed so that the files argument is optional and defaults to foo in this case.