xbps-bin(8): added a new target "find-files".
This new target 'find-files' can be used to find which installed package(s) own a file. Exact matches like "/bin/mount" or patterns like "/usr/lib/libb[ao]b\*" can be specified.
This commit is contained in:
@@ -43,6 +43,7 @@ usage(void)
|
||||
" autoremove\n"
|
||||
" autoupdate\n"
|
||||
" check\t\t[<pkgname>|<all>]\n"
|
||||
" find-files\t<pattern>\n"
|
||||
" install\t\t[<pkgname(s)>|<pkgpattern(s)>]\n"
|
||||
" list\n"
|
||||
" list-manual\n"
|
||||
@@ -343,6 +344,16 @@ main(int argc, char **argv)
|
||||
|
||||
rv = xbps_show_pkg_reverse_deps(argv[1]);
|
||||
|
||||
} else if (strcasecmp(argv[0], "find-files") == 0) {
|
||||
/*
|
||||
* Find files matched by a pattern from installed
|
||||
* packages.
|
||||
*/
|
||||
if (argc != 2)
|
||||
usage();
|
||||
|
||||
rv = find_files_in_packages(argv[1]);
|
||||
|
||||
} else {
|
||||
usage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user