xbps-repo: add a sync target, to sync the pkg index file from a
remote repository. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091031105740-xdqqsjqymc9rty5j
This commit is contained in:
parent
10e76c6420
commit
4c4f5eebef
@ -57,6 +57,7 @@ usage(void)
|
||||
" remove\t<URI>\n"
|
||||
" search\t<string>\n"
|
||||
" show\t<pkgname>\n"
|
||||
" sync\t\t<URI>\n"
|
||||
" Options shared by all actions:\n"
|
||||
" -r\t\t<rootdir>\n"
|
||||
" -V\t\tPrints xbps release version\n"
|
||||
@ -309,6 +310,17 @@ main(int argc, char **argv)
|
||||
if (rv != 0)
|
||||
exit(rv);
|
||||
|
||||
} else if (strcasecmp(argv[0], "sync") == 0) {
|
||||
/* Syncs the pkg index file from a remote repo */
|
||||
if (argc != 2)
|
||||
usage();
|
||||
|
||||
if (!sanitize_localpath(dpkgidx, argv[1]))
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
printf("Updating package index from: %s\n", dpkgidx);
|
||||
rv = xbps_sync_repository_pkg_index(dpkgidx);
|
||||
|
||||
} else {
|
||||
usage();
|
||||
}
|
||||
|
@ -71,6 +71,11 @@ Please note that all targets are *case insensitive*.
|
||||
the size it takes in filesystem, description, maintainer, architecture
|
||||
and other information.
|
||||
|
||||
*sync 'URI'*::
|
||||
Syncs the package index file that is available from the repository
|
||||
specified at 'URI'. The new file will be fetched if it has been
|
||||
modified since last synchronization.
|
||||
|
||||
|
||||
BUGS
|
||||
----
|
||||
|
Loading…
Reference in New Issue
Block a user