diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-02-22 13:45:16 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-26 17:49:52 +0300 |
commit | 12a5375f25d6a7be5a5741c728a8f9b8168761a4 (patch) | |
tree | 43e1832a9c1e709037f6005276f01ef44f2552bc | |
parent | f619db022734dff6b988c514e3a292a5c7babaf0 (diff) |
Document new rep-list and rep-remove, update rep-add and rep-fetch
-rw-r--r-- | bpkg/bpkg.cli | 18 | ||||
-rw-r--r-- | bpkg/rep-add.cli | 11 | ||||
-rw-r--r-- | bpkg/rep-fetch.cli | 19 | ||||
-rw-r--r-- | bpkg/rep-list.cli | 46 | ||||
-rw-r--r-- | bpkg/rep-remove.cli | 44 | ||||
-rwxr-xr-x | doc/cli.sh | 4 |
6 files changed, 123 insertions, 19 deletions
diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli index ffeb84a..c1109d0 100644 --- a/bpkg/bpkg.cli +++ b/bpkg/bpkg.cli @@ -167,6 +167,16 @@ namespace bpkg "\l{bpkg-rep-add(1)} \- add repository to configuration" } + bool rep-remove|remove + { + "\l{bpkg-rep-remove(1)} \- remove repository from configuration" + } + + bool rep-list|list + { + "\l{bpkg-rep-list(1)} \- list repositories in configuration" + } + bool rep-fetch|fetch { "\l{bpkg-rep-fetch(1)} \- fetch list of available packages" @@ -174,9 +184,7 @@ namespace bpkg bool rep-create { - "[<dir>]", - "\l{bpkg-rep-create(1)} \- create repository", - "" + "\l{bpkg-rep-create(1)} \- create repository" } bool pkg-status|status @@ -221,9 +229,7 @@ namespace bpkg bool pkg-verify { - "<archive>", - "\l{bpkg-pkg-verify(1)} \- verify package archive", - "" + "\l{bpkg-pkg-verify(1)} \- verify package archive" } bool pkg-fetch diff --git a/bpkg/rep-add.cli b/bpkg/rep-add.cli index ff202a5..827e745 100644 --- a/bpkg/rep-add.cli +++ b/bpkg/rep-add.cli @@ -13,17 +13,18 @@ include <bpkg/configuration.cli>; namespace bpkg { { - "<options> <rep> <tag> <branch> <commit-id>", + "<options> <location> <tag> <branch> <commit-id>", "\h|SYNOPSIS| - \c{\b{bpkg rep-add}|\b{add} [<options>] <rep>} + \c{\b{bpkg rep-add}|\b{add} [<options>] <location>...} \h|DESCRIPTION| - The \cb{rep-add} command adds the specified package repository to the - configuration. The repository location <rep> is a URL or a directory - path. + The \cb{rep-add} command adds the specified package repositories to the + configuration. The repository location is a URL or a directory path. If a + repository with the same name already exists in the configuration, then + its location is replaced with the specified. Note that this command doesn't fetch the list of available packages for the newly added repository. For that, use the \l{bpkg-rep-fetch(1)} diff --git a/bpkg/rep-fetch.cli b/bpkg/rep-fetch.cli index ce41d5c..9ec1de7 100644 --- a/bpkg/rep-fetch.cli +++ b/bpkg/rep-fetch.cli @@ -11,18 +11,25 @@ include <bpkg/configuration.cli>; namespace bpkg { { - "<options>", + "<options> <name> <location>", "\h|SYNOPSIS| - \c{\b{bpkg rep-fetch}|\b{fetch} [<options>]} + \c{\b{bpkg rep-fetch}|\b{fetch} [<options>] [(<name>|<location>)...]} \h|DESCRIPTION| - The \cb{rep-fetch} command fetches the list of available packages for all - the repositories that were previously added with the \l{bpkg-rep-add(1)} - command as well as all their complement and prerequisite repositories, - recursively." + The \cb{rep-fetch} command fetches the list of available packages for the + specified repositories as well as all their complement and prerequisite + repositories, recursively. If no repositories were specified, then all + the repositories previously added (\l{bpkg-rep-add(1)}) to the + configuration are fetched. + + The repository to fetch can be specified either as a repository name or + as a repository location (URL or a directory path; see + \l{bpkg-rep-add(1)} for details). In the latter case, the repository + location is added/replaced as if by first executing the \cb{rep-add} + command." } class rep_fetch_options: configuration_options diff --git a/bpkg/rep-list.cli b/bpkg/rep-list.cli new file mode 100644 index 0000000..f25a947 --- /dev/null +++ b/bpkg/rep-list.cli @@ -0,0 +1,46 @@ +// file : bpkg/rep-list.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include <libbpkg/manifest.hxx>; + +include <bpkg/configuration.cli>; + +"\section=1" +"\name=bpkg-rep-list" +"\summary=list repositories in configuration" + +namespace bpkg +{ + { + "<options>", + + "\h|SYNOPSIS| + + \c{\b{bpkg rep-list}|\b{list} [<options>]} + + \h|DESCRIPTION| + + The \cb{rep-list} command lists the repositories in the configuration. + + For each repository a line containing the repository name and location is + printed to \cb{STDOUT}. If the \cb{--complements|-c} and/or + \cb{--prerequisites|-p} options are specified, then it is followed by + the list of complement and/or prerequisite repositories, recursively." + } + + class rep_list_options: configuration_options + { + "\h|REP-LIST OPTIONS|" + + bool --complements|-c + { + "List complement repositories." + } + + bool --prerequisites|-p + { + "List prerequisite repositories." + } + }; +} diff --git a/bpkg/rep-remove.cli b/bpkg/rep-remove.cli new file mode 100644 index 0000000..3662b2b --- /dev/null +++ b/bpkg/rep-remove.cli @@ -0,0 +1,44 @@ +// file : bpkg/rep-remove.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include <libbpkg/manifest.hxx>; + +include <bpkg/configuration.cli>; + +"\section=1" +"\name=bpkg-rep-remove" +"\summary=remove repository from configuration" + +namespace bpkg +{ + { + "<options> <name> <location>", + + "\h|SYNOPSIS| + + \c{\b{bpkg rep-remove}|\b{remove} [<options>] (<name>|<location>)... | + (--all|-a)} + + \h|DESCRIPTION| + + The \cb{rep-remove} command removes the specified package repositories + from the configuration. The repository to remove can be specified either + as a repository name or as a repository location (URL or a directory + path). + + Alternatively, the \cb{--all|-a} option can be used to remove all the + repositories that were previously added (\l{bpkg-rep-add(1)}) to the + configuration." + } + + class rep_remove_options: configuration_options + { + "\h|REP-REMOVE OPTIONS|" + + bool --all|-a + { + "Remove all the repositories." + } + }; +} @@ -58,8 +58,8 @@ compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::c pages="cfg-create help pkg-build pkg-clean pkg-configure pkg-disfigure \ pkg-drop pkg-fetch pkg-checkout pkg-install pkg-purge pkg-status pkg-test \ -pkg-uninstall pkg-unpack pkg-update pkg-verify rep-add rep-create rep-fetch \ -rep-info repository-signing" +pkg-uninstall pkg-unpack pkg-update pkg-verify rep-add rep-remove rep-list \ +rep-create rep-fetch rep-info repository-signing" for p in $pages; do compile $p $o |