unzip: add -Z for "zipinfo mode".
But don't document it because it's a silly idea. Just call zipinfo directly if you want zipinfo! There are multiple uses of `unzip -Z` in the AOSP build, though, so we may as well support it if people are already using it. Test: manual Change-Id: I04b05795badf63febe1210fbeaa96e3bd27237f1
This commit is contained in:
parent
9786fbb9d3
commit
d3aee6653f
1 changed files with 6 additions and 0 deletions
|
@ -435,6 +435,12 @@ int main(int argc, char* argv[]) {
|
|||
};
|
||||
|
||||
if (role == kUnzip) {
|
||||
// `unzip -Z` is "zipinfo mode", so in that case just restart...
|
||||
if (argc > 1 && !strcmp(argv[1], "-Z")) {
|
||||
argv[1] = const_cast<char*>("zipinfo");
|
||||
return main(argc - 1, argv + 1);
|
||||
}
|
||||
|
||||
int opt;
|
||||
while ((opt = getopt_long(argc, argv, "-d:hlnopqvx", opts, nullptr)) != -1) {
|
||||
switch (opt) {
|
||||
|
|
Loading…
Reference in a new issue