From ad257079568746d71d913c6fca96852da6fe3bd6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 11 Jan 2016 10:04:02 +0200 Subject: Reorganize .cli files, add man/xhtml page generation (via script for now) --- bpkg/bpkg-options.cli | 160 ------------------------------------ bpkg/bpkg.cli | 160 ++++++++++++++++++++++++++++++++++++ bpkg/buildfile | 44 +++++----- bpkg/cfg-add-options.cli | 30 ------- bpkg/cfg-add.cli | 30 +++++++ bpkg/cfg-create-options.cli | 56 ------------- bpkg/cfg-create.cli | 56 +++++++++++++ bpkg/cfg-fetch-options.cli | 28 ------- bpkg/cfg-fetch.cli | 28 +++++++ bpkg/common-options.cli | 179 ----------------------------------------- bpkg/common.cli | 179 +++++++++++++++++++++++++++++++++++++++++ bpkg/configuration-options.cli | 22 ----- bpkg/configuration.cli | 22 +++++ bpkg/help-options.cli | 20 ----- bpkg/help.cli | 20 +++++ bpkg/pkg-build-options.cli | 63 --------------- bpkg/pkg-build.cli | 63 +++++++++++++++ bpkg/pkg-clean-options.cli | 28 ------- bpkg/pkg-clean.cli | 28 +++++++ bpkg/pkg-configure-options.cli | 31 ------- bpkg/pkg-configure.cli | 31 +++++++ bpkg/pkg-disfigure-options.cli | 27 ------- bpkg/pkg-disfigure.cli | 27 +++++++ bpkg/pkg-drop-options.cli | 62 -------------- bpkg/pkg-drop.cli | 62 ++++++++++++++ bpkg/pkg-fetch-options.cli | 54 ------------- bpkg/pkg-fetch.cli | 54 +++++++++++++ bpkg/pkg-install-options.cli | 36 --------- bpkg/pkg-install.cli | 36 +++++++++ bpkg/pkg-purge-options.cli | 46 ----------- bpkg/pkg-purge.cli | 46 +++++++++++ bpkg/pkg-status-options.cli | 109 ------------------------- bpkg/pkg-status.cli | 109 +++++++++++++++++++++++++ bpkg/pkg-uninstall-options.cli | 31 ------- bpkg/pkg-uninstall.cli | 31 +++++++ bpkg/pkg-unpack-options.cli | 55 ------------- bpkg/pkg-unpack.cli | 55 +++++++++++++ bpkg/pkg-update-options.cli | 28 ------- bpkg/pkg-update.cli | 28 +++++++ bpkg/pkg-verify-options.cli | 40 --------- bpkg/pkg-verify.cli | 40 +++++++++ bpkg/rep-create-options.cli | 28 ------- bpkg/rep-create.cli | 28 +++++++ bpkg/rep-info-options.cli | 53 ------------ bpkg/rep-info.cli | 53 ++++++++++++ doc/.gitignore | 2 + doc/cli.sh | 58 +++++++++++++ doc/epilogue.1 | 7 ++ doc/epilogue.xhtml | 11 +++ doc/prologue.1 | 6 ++ doc/prologue.xhtml | 70 ++++++++++++++++ 51 files changed, 1362 insertions(+), 1208 deletions(-) delete mode 100644 bpkg/bpkg-options.cli create mode 100644 bpkg/bpkg.cli delete mode 100644 bpkg/cfg-add-options.cli create mode 100644 bpkg/cfg-add.cli delete mode 100644 bpkg/cfg-create-options.cli create mode 100644 bpkg/cfg-create.cli delete mode 100644 bpkg/cfg-fetch-options.cli create mode 100644 bpkg/cfg-fetch.cli delete mode 100644 bpkg/common-options.cli create mode 100644 bpkg/common.cli delete mode 100644 bpkg/configuration-options.cli create mode 100644 bpkg/configuration.cli delete mode 100644 bpkg/help-options.cli create mode 100644 bpkg/help.cli delete mode 100644 bpkg/pkg-build-options.cli create mode 100644 bpkg/pkg-build.cli delete mode 100644 bpkg/pkg-clean-options.cli create mode 100644 bpkg/pkg-clean.cli delete mode 100644 bpkg/pkg-configure-options.cli create mode 100644 bpkg/pkg-configure.cli delete mode 100644 bpkg/pkg-disfigure-options.cli create mode 100644 bpkg/pkg-disfigure.cli delete mode 100644 bpkg/pkg-drop-options.cli create mode 100644 bpkg/pkg-drop.cli delete mode 100644 bpkg/pkg-fetch-options.cli create mode 100644 bpkg/pkg-fetch.cli delete mode 100644 bpkg/pkg-install-options.cli create mode 100644 bpkg/pkg-install.cli delete mode 100644 bpkg/pkg-purge-options.cli create mode 100644 bpkg/pkg-purge.cli delete mode 100644 bpkg/pkg-status-options.cli create mode 100644 bpkg/pkg-status.cli delete mode 100644 bpkg/pkg-uninstall-options.cli create mode 100644 bpkg/pkg-uninstall.cli delete mode 100644 bpkg/pkg-unpack-options.cli create mode 100644 bpkg/pkg-unpack.cli delete mode 100644 bpkg/pkg-update-options.cli create mode 100644 bpkg/pkg-update.cli delete mode 100644 bpkg/pkg-verify-options.cli create mode 100644 bpkg/pkg-verify.cli delete mode 100644 bpkg/rep-create-options.cli create mode 100644 bpkg/rep-create.cli delete mode 100644 bpkg/rep-info-options.cli create mode 100644 bpkg/rep-info.cli create mode 100644 doc/.gitignore create mode 100755 doc/cli.sh create mode 100644 doc/epilogue.1 create mode 100644 doc/epilogue.xhtml create mode 100644 doc/prologue.1 create mode 100644 doc/prologue.xhtml diff --git a/bpkg/bpkg-options.cli b/bpkg/bpkg-options.cli deleted file mode 100644 index 97fb8b8..0000000 --- a/bpkg/bpkg-options.cli +++ /dev/null @@ -1,160 +0,0 @@ -// file : bpkg/bpkg-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg" -"\summary=build2 package manager" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \cb{bpkg --help}\n - \cb{bpkg --version}\n - \c{\b{bpkg help} [|]}\n - \c{\b{bpkg} [] [] } - - \h|DESCRIPTION| - - @@ TODO - - Note that the common options can also be specified as part of the - command-specific options." - } - - class commands - { - "\h|COMMANDS|" - - bool help - { - "[]", - "Show help for a command or help topic \- \l{bpkg-help(1)}.", - "" - } - - bool cfg-create|create - { - "", - "Create configuration.", - "" - } - - bool cfg-add|add - { - "", - "Add repository to configuration.", - "" - } - - bool cfg-fetch|fetch - { - "Fetch list of available packages." - } - - bool pkg-status|status - { - "Print package status." - } - - bool pkg-build|build - { - "Build package \- \l{bpkg-pkg-build(1)}." - } - - bool pkg-drop|drop - { - "Drop package." - } - - bool pkg-install|install - { - "Install package." - } - - bool pkg-uninstall|uninstall - { - "Uninstall package." - } - - bool pkg-update|update - { - "Update package." - } - - bool pkg-clean|clean - { - "Clean package." - } - - bool pkg-verify - { - "", - "Verify archive is a valid package.", - "" - } - - bool pkg-fetch - { - "/", - "Fetch package archive.", - "" - } - - bool pkg-unpack - { - "Unpack package archive." - } - - bool pkg-configure - { - "Configure package." - } - - bool pkg-disfigure - { - "Disfigure package." - } - - bool pkg-purge - { - "Purge package." - } - - bool rep-info - { - "Print information about repository." - } - - bool rep-create - { - "[]", - "Generate repository packages manifest.", - "" - } - }; - - // Make sure these don't conflict with command names above. - // - class topics - { - "\h|HELP TOPICS|" - - bool common-options - { - "Details on common options \- \l{bpkg-common-options(1)}." - } - }; - - class options: common_options - { - bool --help; - bool --version; - }; -} diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli new file mode 100644 index 0000000..e9611ff --- /dev/null +++ b/bpkg/bpkg.cli @@ -0,0 +1,160 @@ +// file : bpkg/bpkg.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg" +"\summary=build2 package manager" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \cb{bpkg --help}\n + \cb{bpkg --version}\n + \c{\b{bpkg help} [|]}\n + \c{\b{bpkg} [] [] } + + \h|DESCRIPTION| + + @@ TODO + + Note that the common options can also be specified as part of the + command-specific options." + } + + class commands + { + "\h|COMMANDS|" + + bool help + { + "[]", + "Show help for a command or help topic \- \l{bpkg-help(1)}.", + "" + } + + bool cfg-create|create + { + "", + "Create configuration.", + "" + } + + bool cfg-add|add + { + "", + "Add repository to configuration.", + "" + } + + bool cfg-fetch|fetch + { + "Fetch list of available packages." + } + + bool pkg-status|status + { + "Print package status." + } + + bool pkg-build|build + { + "Build package \- \l{bpkg-pkg-build(1)}." + } + + bool pkg-drop|drop + { + "Drop package." + } + + bool pkg-install|install + { + "Install package." + } + + bool pkg-uninstall|uninstall + { + "Uninstall package." + } + + bool pkg-update|update + { + "Update package." + } + + bool pkg-clean|clean + { + "Clean package." + } + + bool pkg-verify + { + "", + "Verify archive is a valid package.", + "" + } + + bool pkg-fetch + { + "/", + "Fetch package archive.", + "" + } + + bool pkg-unpack + { + "Unpack package archive." + } + + bool pkg-configure + { + "Configure package." + } + + bool pkg-disfigure + { + "Disfigure package." + } + + bool pkg-purge + { + "Purge package." + } + + bool rep-info + { + "Print information about repository." + } + + bool rep-create + { + "[]", + "Generate repository packages manifest.", + "" + } + }; + + // Make sure these don't conflict with command names above. + // + class topics + { + "\h|HELP TOPICS|" + + bool common-options + { + "Details on common options \- \l{bpkg-common-options(1)}." + } + }; + + class options: common_options + { + bool --help; + bool --version; + }; +} diff --git a/bpkg/buildfile b/bpkg/buildfile index c33a8ce..9f4d904 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -60,41 +60,41 @@ if! $cli.loaded cli{*}: extension = cli } -{hxx ixx cxx}{common-options}: cli{common-options} -{hxx ixx cxx}{configuration-options}: cli{configuration-options} -{hxx ixx cxx}{bpkg-options}: cli{bpkg-options} +{hxx ixx cxx}{common-options}: cli{common} +{hxx ixx cxx}{configuration-options}: cli{configuration} +{hxx ixx cxx}{bpkg-options}: cli{bpkg} # Help command. # -{hxx ixx cxx}{help-options}: cli{help-options} +{hxx ixx cxx}{help-options}: cli{help} # pkg-* command. # -{hxx ixx cxx}{pkg-build-options}: cli{pkg-build-options} -{hxx ixx cxx}{pkg-clean-options}: cli{pkg-clean-options} -{hxx ixx cxx}{pkg-configure-options}: cli{pkg-configure-options} -{hxx ixx cxx}{pkg-disfigure-options}: cli{pkg-disfigure-options} -{hxx ixx cxx}{pkg-drop-options}: cli{pkg-drop-options} -{hxx ixx cxx}{pkg-fetch-options}: cli{pkg-fetch-options} -{hxx ixx cxx}{pkg-install-options}: cli{pkg-install-options} -{hxx ixx cxx}{pkg-purge-options}: cli{pkg-purge-options} -{hxx ixx cxx}{pkg-status-options}: cli{pkg-status-options} -{hxx ixx cxx}{pkg-uninstall-options}: cli{pkg-uninstall-options} -{hxx ixx cxx}{pkg-unpack-options}: cli{pkg-unpack-options} -{hxx ixx cxx}{pkg-update-options}: cli{pkg-update-options} -{hxx ixx cxx}{pkg-verify-options}: cli{pkg-verify-options} +{hxx ixx cxx}{pkg-build-options}: cli{pkg-build} +{hxx ixx cxx}{pkg-clean-options}: cli{pkg-clean} +{hxx ixx cxx}{pkg-configure-options}: cli{pkg-configure} +{hxx ixx cxx}{pkg-disfigure-options}: cli{pkg-disfigure} +{hxx ixx cxx}{pkg-drop-options}: cli{pkg-drop} +{hxx ixx cxx}{pkg-fetch-options}: cli{pkg-fetch} +{hxx ixx cxx}{pkg-install-options}: cli{pkg-install} +{hxx ixx cxx}{pkg-purge-options}: cli{pkg-purge} +{hxx ixx cxx}{pkg-status-options}: cli{pkg-status} +{hxx ixx cxx}{pkg-uninstall-options}: cli{pkg-uninstall} +{hxx ixx cxx}{pkg-unpack-options}: cli{pkg-unpack} +{hxx ixx cxx}{pkg-update-options}: cli{pkg-update} +{hxx ixx cxx}{pkg-verify-options}: cli{pkg-verify} # cfg-* command. # -{hxx ixx cxx}{cfg-create-options}: cli{cfg-create-options} +{hxx ixx cxx}{cfg-create-options}: cli{cfg-create} # rep-* command. # -{hxx ixx cxx}{cfg-add-options}: cli{cfg-add-options} -{hxx ixx cxx}{cfg-fetch-options}: cli{cfg-fetch-options} -{hxx ixx cxx}{rep-info-options}: cli{rep-info-options} -{hxx ixx cxx}{rep-create-options}: cli{rep-create-options} +{hxx ixx cxx}{cfg-add-options}: cli{cfg-add} +{hxx ixx cxx}{cfg-fetch-options}: cli{cfg-fetch} +{hxx ixx cxx}{rep-info-options}: cli{rep-info} +{hxx ixx cxx}{rep-create-options}: cli{rep-create} # Option length must be the same to get commands/topics/options aligned. # diff --git a/bpkg/cfg-add-options.cli b/bpkg/cfg-add-options.cli deleted file mode 100644 index 9c81e4f..0000000 --- a/bpkg/cfg-add-options.cli +++ /dev/null @@ -1,30 +0,0 @@ -// file : bpkg/cfg-add-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-cfg-add" -"\summary=add repository to configuration" - -/* -"\h{SYNOPSIS} - -bpkg cfg-add [] " - -"\h{DESCRIPTION} - -The \cb{cfg-add} command adds the specified source repository to the -configuration. Note that this command doesn't fetch the available -packages list for the newly added repository. To do that, use the -\cb{cfg-fetch} command. -" -*/ - -namespace bpkg -{ - class cfg_add_options: configuration_options - { - }; -} diff --git a/bpkg/cfg-add.cli b/bpkg/cfg-add.cli new file mode 100644 index 0000000..34909e9 --- /dev/null +++ b/bpkg/cfg-add.cli @@ -0,0 +1,30 @@ +// file : bpkg/cfg-add.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-cfg-add" +"\summary=add repository to configuration" + +/* +"\h{SYNOPSIS} + +bpkg cfg-add [] " + +"\h{DESCRIPTION} + +The \cb{cfg-add} command adds the specified source repository to the +configuration. Note that this command doesn't fetch the available +packages list for the newly added repository. To do that, use the +\cb{cfg-fetch} command. +" +*/ + +namespace bpkg +{ + class cfg_add_options: configuration_options + { + }; +} diff --git a/bpkg/cfg-create-options.cli b/bpkg/cfg-create-options.cli deleted file mode 100644 index b073fdf..0000000 --- a/bpkg/cfg-create-options.cli +++ /dev/null @@ -1,56 +0,0 @@ -// file : bpkg/cfg-create-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-cfg-create" -"\summary=create configuration" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \c{\b{bpkg cfg-create} [] [( | )...]} - - \h|DESCRIPTION| - - The \cb{cfg-create} command creates a new \cb{bpkg} configuration with - the specified \cb{build2} modules and configuration variables. Unless - the \cb{--wipe} option is specified, \cb{cfg-create} expects the - configuration directory to be empty or to not exist (in which case it - will be created). - - By default the resulting configuration loads the \cb{config}, \cb{test}, - and \cb{install} modules. However, additional modules and, if required, - their configuration variables can be specified as the \cb{cfg-create} - arguments. For example: - - \ - bpkg cfg-create cxx config.cxx=clang++ config.install.root=/usr/local - \ - " - } - - class cfg_create_options: common_options - { - "\h|CFG-CREATE OPTIONS|" - - dir_path --directory|-d (".") - { - "", - "Create configuration in rather than in the current working - directory." - } - - bool --wipe - { - "Wipe the configuration directory clean before creating the new - configuration." - } - }; -} diff --git a/bpkg/cfg-create.cli b/bpkg/cfg-create.cli new file mode 100644 index 0000000..e28778e --- /dev/null +++ b/bpkg/cfg-create.cli @@ -0,0 +1,56 @@ +// file : bpkg/cfg-create.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-cfg-create" +"\summary=create configuration" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg cfg-create} [] [( | )...]} + + \h|DESCRIPTION| + + The \cb{cfg-create} command creates a new \cb{bpkg} configuration with + the specified \cb{build2} modules and configuration variables. Unless + the \cb{--wipe} option is specified, \cb{cfg-create} expects the + configuration directory to be empty or to not exist (in which case it + will be created). + + By default the resulting configuration loads the \cb{config}, \cb{test}, + and \cb{install} modules. However, additional modules and, if required, + their configuration variables can be specified as the \cb{cfg-create} + arguments. For example: + + \ + bpkg cfg-create cxx config.cxx=clang++ config.install.root=/usr/local + \ + " + } + + class cfg_create_options: common_options + { + "\h|CFG-CREATE OPTIONS|" + + dir_path --directory|-d (".") + { + "", + "Create configuration in rather than in the current working + directory." + } + + bool --wipe + { + "Wipe the configuration directory clean before creating the new + configuration." + } + }; +} diff --git a/bpkg/cfg-fetch-options.cli b/bpkg/cfg-fetch-options.cli deleted file mode 100644 index 6d420a6..0000000 --- a/bpkg/cfg-fetch-options.cli +++ /dev/null @@ -1,28 +0,0 @@ -// file : bpkg/cfg-fetch-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-cfg-fetch" -"\summary=fetch available packages list" - -/* -"\h{SYNOPSIS} - -bpkg cfg-fetch []" - -"\h{DESCRIPTION} - -The \cb{cfg-fetch} command recursively fetches the prerequisite repository -and available package lists for all the repositories that were added -(\cb{cfg-add}) to the configuration." -*/ - -namespace bpkg -{ - class cfg_fetch_options: configuration_options - { - }; -} diff --git a/bpkg/cfg-fetch.cli b/bpkg/cfg-fetch.cli new file mode 100644 index 0000000..6b889cc --- /dev/null +++ b/bpkg/cfg-fetch.cli @@ -0,0 +1,28 @@ +// file : bpkg/cfg-fetch.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-cfg-fetch" +"\summary=fetch available packages list" + +/* +"\h{SYNOPSIS} + +bpkg cfg-fetch []" + +"\h{DESCRIPTION} + +The \cb{cfg-fetch} command recursively fetches the prerequisite repository +and available package lists for all the repositories that were added +(\cb{cfg-add}) to the configuration." +*/ + +namespace bpkg +{ + class cfg_fetch_options: configuration_options + { + }; +} diff --git a/bpkg/common-options.cli b/bpkg/common-options.cli deleted file mode 100644 index d811238..0000000 --- a/bpkg/common-options.cli +++ /dev/null @@ -1,179 +0,0 @@ -// file : bpkg/common-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-common-options" -"\summary=options common for all commands" - -namespace bpkg -{ - { - "", - - "\h|SYNOPSIS| - - \c{\b{bpkg} [] ...} - - \h|DESCRIPTION| - - The common options can be specified either before the command or after, - togethere with the command-specific options." - } - - class common_options = 0 - { - "\h|COMMON OPTIONS|" - - // Retain this note only in the summary. - // - { - "", - "The common options are summarized below with a more detailed description - available as the \l{bpkg-common-options(1) \cb{common-options}} help - topic.", - "" - } - - bool -v - { - "Print underlying commands being executed. This is equivalent to - \cb{--verbose 2}." - } - - bool -q - { - "Run quietly, only printing error messages. This is equivalent - to \cb{--verbose 0}." - } - - uint16_t --verbose = 1 - { - "", - "Set the diagnostics verbosity to between 0 and 6. Level 0 - disables any non-error messages while level 6 produces lots of - information, with level 1 beeing the default. The following additional - types of diagnostics are produced at each level: - - \ol| - - \li|high-level information messages| - - \li|essential underlying commands that are being executed| - - \li|all underlying commands that are being executed| - - \li|information that could be helpful to the user| - - \li|information that could be helpful to the developer| - - \li|even more detailed information||" - } - - path --build = "b" - { - "", - "The build program to be used to build packages. This should be the path - to the build2 \cb{b} executable. You can also specify additional options - that should be passed to the build program with \cb{--build-option}. If - the build program is not explicitly specified, then \cb{bpkg} will use - \cb{b} by default." - } - - strings --build-option - { - "", - "Additional option to be passed to the build program. See \cb{--build} - for more information on the build program. Repeat this option to specify - multiple build options." - } - - path --fetch - { - "", - "The fetch program to be used to download resources. Currently, - \cb{bpkg} recognizes \cb{curl}, \cb{wget}, and \cb{fetch}. Note that - the last component of must contain one of these names as a - substring in order for \cb{bpkg} to recognize which program is being - used. You can also specify additional options that should be passed - to the fetch program with \cb{--fetch-option}. - - If the fetch program is not specified, then \cb{bpkg} will try to - discover if one of the above program is available and use that. - Currently, \cb{bpkg} has the following preference order: \cb{wget} - 1.16 or higher (supports \cb{--show-progress}), \cb{curl}, - \cb{wget}, and \cb{fetch}." - } - - strings --fetch-option - { - "", - "Additional option to be passed to the fetch program. See \cb{--fetch} - for more information on the fetch program. Repeat this option to - specify multiple fetch options." - } - - path --tar = "tar" - { - "", - "The tar program to be used to extract package archives. For example, - \cb{gtar} or \cb{bsdtar}. You can also specify additional options that - should be passed to the tar program with \cb{--tar-option}. If the tar - program is not explicitly specified, then \cb{bpkg} will use \cb{tar} - by default." - } - - strings --tar-option - { - "", - "Additional option to be passed to the tar program. See \cb{--tar} for - more information on the tar program. Repeat this option to specify - multiple tar options." - } - - string --pager // String to allow empty value. - { - "", - "The pager program to be used to show long text. Commonly used pager - programs are \cb{less} and \cb{more}. You can also specify additional - options that should be passed to the pager program with - \cb{--pager-option}. If an empty string is specified as the pager - program, then no pager will be used. If the pager program is not - explicitly specified, then \cb{bpkg} will try to use \cb{less}. If it - is not available, then no pager will be used." - } - - strings --pager-option - { - "", - "Additional option to be passed to the pager program. See \cb{--pager} - for more information on the pager program. Repeat this option to - specify multiple pager options." - } - - // The following option is "fake" in that it is actually handled by - // argv_file_scanner. We have it here for documentation. - // - string --options-file - { - "", - "Read additional options from . Each option should appearing on a - separate line optionally followed by space and an option value. Empty - lines and lines starting with \cb{#} are ignored. Option values can - be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve - leading and trailing whitespaces as well as to specify empty values. - If the value itself contains trailing or leading quotes, enclose it - with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading - and non-trailing quotes are interpreted as being part of the option - value. - - The semantics of providing options in a file is equivalent to providing - the same set of options in the same order on the command line at the - point where the \cb{--options-file} option is specified except that - the shell escaping and quoting is not required. You can repeat this - option to specify more than one options file." - } - }; -} diff --git a/bpkg/common.cli b/bpkg/common.cli new file mode 100644 index 0000000..17ee1a6 --- /dev/null +++ b/bpkg/common.cli @@ -0,0 +1,179 @@ +// file : bpkg/common.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-common-options" +"\summary=options common for all commands" + +namespace bpkg +{ + { + "", + + "\h|SYNOPSIS| + + \c{\b{bpkg} [] ...} + + \h|DESCRIPTION| + + The common options can be specified either before the command or after, + togethere with the command-specific options." + } + + class common_options = 0 + { + "\h|COMMON OPTIONS|" + + // Retain this note only in the summary. + // + { + "", + "The common options are summarized below with a more detailed description + available as the \l{bpkg-common-options(1) \cb{common-options}} help + topic.", + "" + } + + bool -v + { + "Print underlying commands being executed. This is equivalent to + \cb{--verbose 2}." + } + + bool -q + { + "Run quietly, only printing error messages. This is equivalent + to \cb{--verbose 0}." + } + + uint16_t --verbose = 1 + { + "", + "Set the diagnostics verbosity to between 0 and 6. Level 0 + disables any non-error messages while level 6 produces lots of + information, with level 1 beeing the default. The following additional + types of diagnostics are produced at each level: + + \ol| + + \li|high-level information messages| + + \li|essential underlying commands that are being executed| + + \li|all underlying commands that are being executed| + + \li|information that could be helpful to the user| + + \li|information that could be helpful to the developer| + + \li|even more detailed information||" + } + + path --build = "b" + { + "", + "The build program to be used to build packages. This should be the path + to the build2 \cb{b} executable. You can also specify additional options + that should be passed to the build program with \cb{--build-option}. If + the build program is not explicitly specified, then \cb{bpkg} will use + \cb{b} by default." + } + + strings --build-option + { + "", + "Additional option to be passed to the build program. See \cb{--build} + for more information on the build program. Repeat this option to specify + multiple build options." + } + + path --fetch + { + "", + "The fetch program to be used to download resources. Currently, + \cb{bpkg} recognizes \cb{curl}, \cb{wget}, and \cb{fetch}. Note that + the last component of must contain one of these names as a + substring in order for \cb{bpkg} to recognize which program is being + used. You can also specify additional options that should be passed + to the fetch program with \cb{--fetch-option}. + + If the fetch program is not specified, then \cb{bpkg} will try to + discover if one of the above program is available and use that. + Currently, \cb{bpkg} has the following preference order: \cb{wget} + 1.16 or higher (supports \cb{--show-progress}), \cb{curl}, + \cb{wget}, and \cb{fetch}." + } + + strings --fetch-option + { + "", + "Additional option to be passed to the fetch program. See \cb{--fetch} + for more information on the fetch program. Repeat this option to + specify multiple fetch options." + } + + path --tar = "tar" + { + "", + "The tar program to be used to extract package archives. For example, + \cb{gtar} or \cb{bsdtar}. You can also specify additional options that + should be passed to the tar program with \cb{--tar-option}. If the tar + program is not explicitly specified, then \cb{bpkg} will use \cb{tar} + by default." + } + + strings --tar-option + { + "", + "Additional option to be passed to the tar program. See \cb{--tar} for + more information on the tar program. Repeat this option to specify + multiple tar options." + } + + string --pager // String to allow empty value. + { + "", + "The pager program to be used to show long text. Commonly used pager + programs are \cb{less} and \cb{more}. You can also specify additional + options that should be passed to the pager program with + \cb{--pager-option}. If an empty string is specified as the pager + program, then no pager will be used. If the pager program is not + explicitly specified, then \cb{bpkg} will try to use \cb{less}. If it + is not available, then no pager will be used." + } + + strings --pager-option + { + "", + "Additional option to be passed to the pager program. See \cb{--pager} + for more information on the pager program. Repeat this option to + specify multiple pager options." + } + + // The following option is "fake" in that it is actually handled by + // argv_file_scanner. We have it here for documentation. + // + string --options-file + { + "", + "Read additional options from . Each option should appearing on a + separate line optionally followed by space and an option value. Empty + lines and lines starting with \cb{#} are ignored. Option values can + be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve + leading and trailing whitespaces as well as to specify empty values. + If the value itself contains trailing or leading quotes, enclose it + with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading + and non-trailing quotes are interpreted as being part of the option + value. + + The semantics of providing options in a file is equivalent to providing + the same set of options in the same order on the command line at the + point where the \cb{--options-file} option is specified except that + the shell escaping and quoting is not required. You can repeat this + option to specify more than one options file." + } + }; +} diff --git a/bpkg/configuration-options.cli b/bpkg/configuration-options.cli deleted file mode 100644 index b9c6dbc..0000000 --- a/bpkg/configuration-options.cli +++ /dev/null @@ -1,22 +0,0 @@ -// file : bpkg/configuration-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\name=configuration" // Not a man page. - -namespace bpkg -{ - // Common options for commands that operate on a configuration. - // - class configuration_options: common_options - { - dir_path --directory|-d (".") - { - "", - "Assume configuration is in rather than in the current working - directory." - } - }; -} diff --git a/bpkg/configuration.cli b/bpkg/configuration.cli new file mode 100644 index 0000000..5b174b9 --- /dev/null +++ b/bpkg/configuration.cli @@ -0,0 +1,22 @@ +// file : bpkg/configuration.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\name=configuration" // Not a man page. + +namespace bpkg +{ + // Common options for commands that operate on a configuration. + // + class configuration_options: common_options + { + dir_path --directory|-d (".") + { + "", + "Assume configuration is in rather than in the current working + directory." + } + }; +} diff --git a/bpkg/help-options.cli b/bpkg/help-options.cli deleted file mode 100644 index 4be6f10..0000000 --- a/bpkg/help-options.cli +++ /dev/null @@ -1,20 +0,0 @@ -// file : bpkg/help-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-help" -"\summary=show help for a command or help topic" - -namespace bpkg -{ - class help_options: common_options - { - /* - "Show detailed help for a command or help topic or the list of - available commands and topics if none was specified." - */ - }; -} diff --git a/bpkg/help.cli b/bpkg/help.cli new file mode 100644 index 0000000..69e818c --- /dev/null +++ b/bpkg/help.cli @@ -0,0 +1,20 @@ +// file : bpkg/help.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-help" +"\summary=show help for a command or help topic" + +namespace bpkg +{ + class help_options: common_options + { + /* + "Show detailed help for a command or help topic or the list of + available commands and topics if none was specified." + */ + }; +} diff --git a/bpkg/pkg-build-options.cli b/bpkg/pkg-build-options.cli deleted file mode 100644 index 39b96f1..0000000 --- a/bpkg/pkg-build-options.cli +++ /dev/null @@ -1,63 +0,0 @@ -// file : bpkg/pkg-build-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-build" -"\summary=build one or more packages" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \c{\b{bpkg pkg-build} [] ([/] | | )...} - - \h|DESCRIPTION| - - The \cb{pkg-build} command builds one or more packages including all their - prerequisites. Each package can be specified as just the name () with - optional package version () in which case the package will be - automatically fetched from one of the configuration's source repositories - (see the \cb{cfg-add} and \cb{cfg-fetch} commands). Alternatively, the - package can be specified as either the path to the package source archive - () or package source directory (). See the \cb{pkg-fetch} and - \cb{pkg-unpack} commands for more information on the semantics of - specifying the package as an archive or directory. - - Packages that are specified explicitly on the command line will be - \i{held}, that is, they will not be considered for automatic removal if - they no longer have any dependents. Packages that are specified with the - explicit package version () or as an archive or directory, will, in - addition, have their versions held, that is, they will not be - automatically upgraded. - - The \cb{pkg-build} command also supports several \cb{--*-only} options - that allow you to limit the amount of work that will be done." - } - - class pkg_build_options: configuration_options - { - "\h|PKG-BUILD OPTIONS|" - - bool --yes|-y - { - "Assume the answer to all prompts is \cb{yes}." - } - - bool --configure-only|-c - { - "Configure all the packages but don't update." - } - - bool --print-only|-p - { - "Print to \cb{STDOUT} what would be done without actually doing - anything." - } - }; -} diff --git a/bpkg/pkg-build.cli b/bpkg/pkg-build.cli new file mode 100644 index 0000000..54e0252 --- /dev/null +++ b/bpkg/pkg-build.cli @@ -0,0 +1,63 @@ +// file : bpkg/pkg-build.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-build" +"\summary=build one or more packages" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg pkg-build} [] ([/] | | )...} + + \h|DESCRIPTION| + + The \cb{pkg-build} command builds one or more packages including all their + prerequisites. Each package can be specified as just the name () with + optional package version () in which case the package will be + automatically fetched from one of the configuration's source repositories + (see the \cb{cfg-add} and \cb{cfg-fetch} commands). Alternatively, the + package can be specified as either the path to the package source archive + () or package source directory (). See the \cb{pkg-fetch} and + \cb{pkg-unpack} commands for more information on the semantics of + specifying the package as an archive or directory. + + Packages that are specified explicitly on the command line will be + \i{held}, that is, they will not be considered for automatic removal if + they no longer have any dependents. Packages that are specified with the + explicit package version () or as an archive or directory, will, in + addition, have their versions held, that is, they will not be + automatically upgraded. + + The \cb{pkg-build} command also supports several \cb{--*-only} options + that allow you to limit the amount of work that will be done." + } + + class pkg_build_options: configuration_options + { + "\h|PKG-BUILD OPTIONS|" + + bool --yes|-y + { + "Assume the answer to all prompts is \cb{yes}." + } + + bool --configure-only|-c + { + "Configure all the packages but don't update." + } + + bool --print-only|-p + { + "Print to \cb{STDOUT} what would be done without actually doing + anything." + } + }; +} diff --git a/bpkg/pkg-clean-options.cli b/bpkg/pkg-clean-options.cli deleted file mode 100644 index 0d10d5e..0000000 --- a/bpkg/pkg-clean-options.cli +++ /dev/null @@ -1,28 +0,0 @@ -// file : bpkg/pkg-clean-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-clean" -"\summary=clean package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-clean ..." - -"\h{DESCRIPTION} - -The \cb{pkg-clean} command cleans the previously configured -(\cb{pkg-configure}) package. Underneath, this command doesn't -do much more than run (\cb{b clean})." -*/ - -namespace bpkg -{ - class pkg_clean_options: configuration_options - { - }; -} diff --git a/bpkg/pkg-clean.cli b/bpkg/pkg-clean.cli new file mode 100644 index 0000000..9452291 --- /dev/null +++ b/bpkg/pkg-clean.cli @@ -0,0 +1,28 @@ +// file : bpkg/pkg-clean.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-clean" +"\summary=clean package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-clean ..." + +"\h{DESCRIPTION} + +The \cb{pkg-clean} command cleans the previously configured +(\cb{pkg-configure}) package. Underneath, this command doesn't +do much more than run (\cb{b clean})." +*/ + +namespace bpkg +{ + class pkg_clean_options: configuration_options + { + }; +} diff --git a/bpkg/pkg-configure-options.cli b/bpkg/pkg-configure-options.cli deleted file mode 100644 index 0f4084f..0000000 --- a/bpkg/pkg-configure-options.cli +++ /dev/null @@ -1,31 +0,0 @@ -// file : bpkg/pkg-configure-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-configure" -"\summary=configure package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-configure []" - -"\h{DESCRIPTION} - -The \cb{pkg-configure} command configures the output directory for -the previously unpacked (\cb{pkg-unpack}) package. The package -inherits the common \cb{build2} configuration values that were -specified when creating the \cb{bpkg} configuration (\cb{cfg-create}). -Additional, package-specific configuration variables can be specified -after the package name." -*/ - -namespace bpkg -{ - class pkg_configure_options: configuration_options - { - }; -} diff --git a/bpkg/pkg-configure.cli b/bpkg/pkg-configure.cli new file mode 100644 index 0000000..4ef9707 --- /dev/null +++ b/bpkg/pkg-configure.cli @@ -0,0 +1,31 @@ +// file : bpkg/pkg-configure.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-configure" +"\summary=configure package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-configure []" + +"\h{DESCRIPTION} + +The \cb{pkg-configure} command configures the output directory for +the previously unpacked (\cb{pkg-unpack}) package. The package +inherits the common \cb{build2} configuration values that were +specified when creating the \cb{bpkg} configuration (\cb{cfg-create}). +Additional, package-specific configuration variables can be specified +after the package name." +*/ + +namespace bpkg +{ + class pkg_configure_options: configuration_options + { + }; +} diff --git a/bpkg/pkg-disfigure-options.cli b/bpkg/pkg-disfigure-options.cli deleted file mode 100644 index 31bf1b8..0000000 --- a/bpkg/pkg-disfigure-options.cli +++ /dev/null @@ -1,27 +0,0 @@ -// file : bpkg/pkg-disfigure-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-disfigure" -"\summary=disfigure package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-disfigure []" - -"\h{DESCRIPTION} - -The \cb{pkg-disfigure} command disfigures the previously configured -(\cb{pkg-configure}) package and returns it to the \cb{unpacked} state." -*/ - -namespace bpkg -{ - class pkg_disfigure_options: configuration_options - { - }; -} diff --git a/bpkg/pkg-disfigure.cli b/bpkg/pkg-disfigure.cli new file mode 100644 index 0000000..6f5c80b --- /dev/null +++ b/bpkg/pkg-disfigure.cli @@ -0,0 +1,27 @@ +// file : bpkg/pkg-disfigure.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-disfigure" +"\summary=disfigure package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-disfigure []" + +"\h{DESCRIPTION} + +The \cb{pkg-disfigure} command disfigures the previously configured +(\cb{pkg-configure}) package and returns it to the \cb{unpacked} state." +*/ + +namespace bpkg +{ + class pkg_disfigure_options: configuration_options + { + }; +} diff --git a/bpkg/pkg-drop-options.cli b/bpkg/pkg-drop-options.cli deleted file mode 100644 index 7c8f7dc..0000000 --- a/bpkg/pkg-drop-options.cli +++ /dev/null @@ -1,62 +0,0 @@ -// file : bpkg/pkg-drop-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-drop" -"\summary=drop one or more packages" - -/* -"\h{SYNOPSIS} - -bpkg pkg-drop [] ..." - -"\h{DESCRIPTION} - -The \cb{pkg-drop} command drops one or more packages from the configuration. -If the packages being dropped still have dependents, then those will have -to be drop as well and you will be prompted for a confirmation. Similarly, -if the packages being dropped have prerequisites that are no longer needed, -you will be offered to drop those as well. - -The \cb{pkg-drop} command also supports several \cb{--*-only} options that -allow you to limit the amount of work that will be done. -*/ - -namespace bpkg -{ - class pkg_drop_options: configuration_options - { - bool --yes|-y - { - "Assume the answer to all prompts is \cb{yes}. Note that this option - does not apply to the dropping of dependents; use \cb{--drop-dependent} - for that." - } - - bool --no|-n - { - "Assume the answer to all prompts is \cb{no}. Only makes sense together - with \cb{--print-only|-p}." - } - - bool --drop-dependent - { - "Don't warn about or ask for confirmation of dropping dependent - packages." - } - - bool --disfigure-only - { - "Disfigure all the packages but don't purge." - } - - bool --print-only|-p - { - "Print to \cb{STDOUT} what would be done without actually doing - anything." - } - }; -} diff --git a/bpkg/pkg-drop.cli b/bpkg/pkg-drop.cli new file mode 100644 index 0000000..6ec7130 --- /dev/null +++ b/bpkg/pkg-drop.cli @@ -0,0 +1,62 @@ +// file : bpkg/pkg-drop.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-drop" +"\summary=drop one or more packages" + +/* +"\h{SYNOPSIS} + +bpkg pkg-drop [] ..." + +"\h{DESCRIPTION} + +The \cb{pkg-drop} command drops one or more packages from the configuration. +If the packages being dropped still have dependents, then those will have +to be drop as well and you will be prompted for a confirmation. Similarly, +if the packages being dropped have prerequisites that are no longer needed, +you will be offered to drop those as well. + +The \cb{pkg-drop} command also supports several \cb{--*-only} options that +allow you to limit the amount of work that will be done. +*/ + +namespace bpkg +{ + class pkg_drop_options: configuration_options + { + bool --yes|-y + { + "Assume the answer to all prompts is \cb{yes}. Note that this option + does not apply to the dropping of dependents; use \cb{--drop-dependent} + for that." + } + + bool --no|-n + { + "Assume the answer to all prompts is \cb{no}. Only makes sense together + with \cb{--print-only|-p}." + } + + bool --drop-dependent + { + "Don't warn about or ask for confirmation of dropping dependent + packages." + } + + bool --disfigure-only + { + "Disfigure all the packages but don't purge." + } + + bool --print-only|-p + { + "Print to \cb{STDOUT} what would be done without actually doing + anything." + } + }; +} diff --git a/bpkg/pkg-fetch-options.cli b/bpkg/pkg-fetch-options.cli deleted file mode 100644 index 02a8192..0000000 --- a/bpkg/pkg-fetch-options.cli +++ /dev/null @@ -1,54 +0,0 @@ -// file : bpkg/pkg-fetch-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-fetch" -"\summary=fetch package archive" - -/* -"\h{SYNOPSIS} - -bpkg pkg-fetch [] (/)|(-e )" - -"\h{DESCRIPTION} - -The \cb{pkg-fetch} command fetches the archive for the specified package -name and version from one of the configuration's repositories. If the -\cb{-r|--replace} option is specified, then \cb{pkg-fetch} will replace the -archive of a package that is already in the \cb{fetched} or \cb{unpacked} -state. Otherwise, \cb{pkg-fetch} expects the package to not exist in the -configuration's database. - -If the \cb{-e|--existing} option is used, then instead of the name and -version argument, \cb{pkg-fetch} expects a local path to the existing -package archive. In this case, \cb{bpkg} will use the archive in place, -without copying it to the configuration or package cache directories. -Also, unless the \cb{-p|--purge} option is specified, \cb{bpkg} will -not attempt to remove the archive when the package is purged with the -\cb{pkg-purge} command." -*/ - -namespace bpkg -{ - class pkg_fetch_options: configuration_options - { - bool --replace|-r - { - "Replace the archive if the package is already fetched or unpacked." - } - - bool --existing|-e - { - "Treat the argument as an existing package archive path rather than - package name/version to fetch." - } - - bool --purge|-p - { - "Remove the existing package archive when the package is purged." - } - }; -} diff --git a/bpkg/pkg-fetch.cli b/bpkg/pkg-fetch.cli new file mode 100644 index 0000000..ba1d5d9 --- /dev/null +++ b/bpkg/pkg-fetch.cli @@ -0,0 +1,54 @@ +// file : bpkg/pkg-fetch.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-fetch" +"\summary=fetch package archive" + +/* +"\h{SYNOPSIS} + +bpkg pkg-fetch [] (/)|(-e )" + +"\h{DESCRIPTION} + +The \cb{pkg-fetch} command fetches the archive for the specified package +name and version from one of the configuration's repositories. If the +\cb{-r|--replace} option is specified, then \cb{pkg-fetch} will replace the +archive of a package that is already in the \cb{fetched} or \cb{unpacked} +state. Otherwise, \cb{pkg-fetch} expects the package to not exist in the +configuration's database. + +If the \cb{-e|--existing} option is used, then instead of the name and +version argument, \cb{pkg-fetch} expects a local path to the existing +package archive. In this case, \cb{bpkg} will use the archive in place, +without copying it to the configuration or package cache directories. +Also, unless the \cb{-p|--purge} option is specified, \cb{bpkg} will +not attempt to remove the archive when the package is purged with the +\cb{pkg-purge} command." +*/ + +namespace bpkg +{ + class pkg_fetch_options: configuration_options + { + bool --replace|-r + { + "Replace the archive if the package is already fetched or unpacked." + } + + bool --existing|-e + { + "Treat the argument as an existing package archive path rather than + package name/version to fetch." + } + + bool --purge|-p + { + "Remove the existing package archive when the package is purged." + } + }; +} diff --git a/bpkg/pkg-install-options.cli b/bpkg/pkg-install-options.cli deleted file mode 100644 index f6d410b..0000000 --- a/bpkg/pkg-install-options.cli +++ /dev/null @@ -1,36 +0,0 @@ -// file : bpkg/pkg-install-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-install" -"\summary=install package" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \c{\b{bpkg pkg-install} [] ...} - - \h|DESCRIPTION| - - The \cb{pkg-install} command installs one or more packages. Underneath, - this command doesn't do much more than run \cb{b install}. The - installation directory can be specified when creating the configuration - (\l{bpkg-cfg-create(1)}) with the \cb{config.install.root} configuration - variable." - - // @@ Would be nice to be able to specify the root in the command. - // Probably an option to specify additional configuration vars. - } - - class pkg_install_options: configuration_options - { - "\h|PKG-INSTALL OPTIONS|" - }; -} diff --git a/bpkg/pkg-install.cli b/bpkg/pkg-install.cli new file mode 100644 index 0000000..0c1385b --- /dev/null +++ b/bpkg/pkg-install.cli @@ -0,0 +1,36 @@ +// file : bpkg/pkg-install.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-install" +"\summary=install package" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg pkg-install} [] ...} + + \h|DESCRIPTION| + + The \cb{pkg-install} command installs one or more packages. Underneath, + this command doesn't do much more than run \cb{b install}. The + installation directory can be specified when creating the configuration + (\l{bpkg-cfg-create(1)}) with the \cb{config.install.root} configuration + variable." + + // @@ Would be nice to be able to specify the root in the command. + // Probably an option to specify additional configuration vars. + } + + class pkg_install_options: configuration_options + { + "\h|PKG-INSTALL OPTIONS|" + }; +} diff --git a/bpkg/pkg-purge-options.cli b/bpkg/pkg-purge-options.cli deleted file mode 100644 index 05fe716..0000000 --- a/bpkg/pkg-purge-options.cli +++ /dev/null @@ -1,46 +0,0 @@ -// file : bpkg/pkg-purge-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-purge" -"\summary=purge package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-purge [] " - -"\h{DESCRIPTION} - -The \cb{pkg-purge} command removes the package directory and archive -from the filesystem and removes the package from the configuration's -database. Only packages in the \cb{fetched} and \cb{unpacked} state can -be purged plus \cb{broken} packages if the \cb{-f|--force} options is -specified (see this option's description for details on purging broken -packages). If the \cb{-k|--keep} option is specified, then the package -archive is not removed (see this option's description for details on -this mode)." -*/ - -namespace bpkg -{ - class pkg_purge_options: configuration_options - { - bool --keep|-k - { - "Keep the package archive. Note that in this mode the package is - still retained in the configuration's database in the \cb{fetched} - state." - } - - bool --force|-f - { - "Purge a broken package. In this mode \cb{bpkg} will verify that - the package directory and archive no longer exist and will remove - the package from the configuration's database." - } - }; -} diff --git a/bpkg/pkg-purge.cli b/bpkg/pkg-purge.cli new file mode 100644 index 0000000..da618d3 --- /dev/null +++ b/bpkg/pkg-purge.cli @@ -0,0 +1,46 @@ +// file : bpkg/pkg-purge.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-purge" +"\summary=purge package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-purge [] " + +"\h{DESCRIPTION} + +The \cb{pkg-purge} command removes the package directory and archive +from the filesystem and removes the package from the configuration's +database. Only packages in the \cb{fetched} and \cb{unpacked} state can +be purged plus \cb{broken} packages if the \cb{-f|--force} options is +specified (see this option's description for details on purging broken +packages). If the \cb{-k|--keep} option is specified, then the package +archive is not removed (see this option's description for details on +this mode)." +*/ + +namespace bpkg +{ + class pkg_purge_options: configuration_options + { + bool --keep|-k + { + "Keep the package archive. Note that in this mode the package is + still retained in the configuration's database in the \cb{fetched} + state." + } + + bool --force|-f + { + "Purge a broken package. In this mode \cb{bpkg} will verify that + the package directory and archive no longer exist and will remove + the package from the configuration's database." + } + }; +} diff --git a/bpkg/pkg-status-options.cli b/bpkg/pkg-status-options.cli deleted file mode 100644 index bd2959c..0000000 --- a/bpkg/pkg-status-options.cli +++ /dev/null @@ -1,109 +0,0 @@ -// file : bpkg/pkg-status-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-status" -"\summary=print package status" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \c{\b{bpkg pkg-status} [] [/]} - - \h|DESCRIPTION| - - The \cb{pkg-status} command prints the status of the specified package or, - if is specified, package version. Note that the status is written - to \cb{STDOUT}, not \cb{STDERR}. - - The status format is regular. First always comes one of the following - status words: - - \dl| - - \li|\cb{unknown} - - package is not part of the configuration nor available in one of the - repositories| - - \li|\cb{available} - - package is not part of the configuration but is available in one of - the repositories| - - \li|\cb{fetched} - - package is part of the configuration and is fetched| - - \li|\cb{unpacked} - - package is part of the configuration and is unpacked| - - \li|\cb{configured} - - package is part of the configuration and is configured|| - - - If only the package name was specified without the package version, then - the \cb{available} status word is followed by the list of available - versions. - - Similarly, if only the package name was specified, then the \cb{fetched}, - \cb{unpacked}, and \cb{configured} status words are followed by the - version of the package. After the possible package version, these status - words may be followed by one or more sub-status words. Currently, these - can be \cb{hold_package} (package should not be automatically dropped) - and \cb{hold_version} (package should not be automatically upgraded). - Finally, if only the package name was specified and newer versions are - available in the repositories, then the sub-status words are followed - by '\cb{;}', the \cb{available} status word, and the list of newer - versions. - - Below are some examples, assuming the configuration has libfoo 1.0.0 - configured and held as well as libfoo 1.1.0 and 1.1.1 available from a - repository. - - \ - bpkg pkg-status libbar - unknown - - bpkg pkg-status libbar/1.0.0 - unknown - - bpkg pkg-status libfoo/1.0.0 - configured hold_package - - bpkg pkg-status libfoo/1.1.0 - available - - bpkg pkg-status libfoo - configured 1.0.0 hold_package; available 1.1.0 1.1.1 - \ - - Assuming now that we dropped libfoo from the configuration: - - \ - bpkg pkg-status libfoo/1.0.0 - unknown - - bpkg pkg-status libfoo/1.1.0 - available - - bpkg pkg-status libfoo - available 1.1.0 1.1.1 - \ - " - } - - class pkg_status_options: configuration_options - { - "\h|PKG-STATUS OPTIONS|" - }; -} diff --git a/bpkg/pkg-status.cli b/bpkg/pkg-status.cli new file mode 100644 index 0000000..fb20f78 --- /dev/null +++ b/bpkg/pkg-status.cli @@ -0,0 +1,109 @@ +// file : bpkg/pkg-status.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-status" +"\summary=print package status" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg pkg-status} [] [/]} + + \h|DESCRIPTION| + + The \cb{pkg-status} command prints the status of the specified package or, + if is specified, package version. Note that the status is written + to \cb{STDOUT}, not \cb{STDERR}. + + The status format is regular. First always comes one of the following + status words: + + \dl| + + \li|\cb{unknown} + + package is not part of the configuration nor available in one of the + repositories| + + \li|\cb{available} + + package is not part of the configuration but is available in one of + the repositories| + + \li|\cb{fetched} + + package is part of the configuration and is fetched| + + \li|\cb{unpacked} + + package is part of the configuration and is unpacked| + + \li|\cb{configured} + + package is part of the configuration and is configured|| + + + If only the package name was specified without the package version, then + the \cb{available} status word is followed by the list of available + versions. + + Similarly, if only the package name was specified, then the \cb{fetched}, + \cb{unpacked}, and \cb{configured} status words are followed by the + version of the package. After the possible package version, these status + words may be followed by one or more sub-status words. Currently, these + can be \cb{hold_package} (package should not be automatically dropped) + and \cb{hold_version} (package should not be automatically upgraded). + Finally, if only the package name was specified and newer versions are + available in the repositories, then the sub-status words are followed + by '\cb{;}', the \cb{available} status word, and the list of newer + versions. + + Below are some examples, assuming the configuration has libfoo 1.0.0 + configured and held as well as libfoo 1.1.0 and 1.1.1 available from a + repository. + + \ + bpkg pkg-status libbar + unknown + + bpkg pkg-status libbar/1.0.0 + unknown + + bpkg pkg-status libfoo/1.0.0 + configured hold_package + + bpkg pkg-status libfoo/1.1.0 + available + + bpkg pkg-status libfoo + configured 1.0.0 hold_package; available 1.1.0 1.1.1 + \ + + Assuming now that we dropped libfoo from the configuration: + + \ + bpkg pkg-status libfoo/1.0.0 + unknown + + bpkg pkg-status libfoo/1.1.0 + available + + bpkg pkg-status libfoo + available 1.1.0 1.1.1 + \ + " + } + + class pkg_status_options: configuration_options + { + "\h|PKG-STATUS OPTIONS|" + }; +} diff --git a/bpkg/pkg-uninstall-options.cli b/bpkg/pkg-uninstall-options.cli deleted file mode 100644 index 5e68ec3..0000000 --- a/bpkg/pkg-uninstall-options.cli +++ /dev/null @@ -1,31 +0,0 @@ -// file : bpkg/pkg-uninstall-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-uninstall" -"\summary=uninstall package" - -namespace bpkg -{ - { - " ", - - "\h|SYNOPSIS| - - \c{\b{bpkg pkg-uninstall} [] ...} - - \h|DESCRIPTION| - - The \cb{pkg-uninstall} command uninstalls one or more packages that were - previously installed with \l{bpkg-cfg-install(1)}. Underneath, this - command doesn't do much more than run \cb{b uninstall}." - } - - class pkg_uninstall_options: configuration_options - { - "\h|PKG-UNINSTALL OPTIONS|" - }; -} diff --git a/bpkg/pkg-uninstall.cli b/bpkg/pkg-uninstall.cli new file mode 100644 index 0000000..536f6ec --- /dev/null +++ b/bpkg/pkg-uninstall.cli @@ -0,0 +1,31 @@ +// file : bpkg/pkg-uninstall.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-uninstall" +"\summary=uninstall package" + +namespace bpkg +{ + { + " ", + + "\h|SYNOPSIS| + + \c{\b{bpkg pkg-uninstall} [] ...} + + \h|DESCRIPTION| + + The \cb{pkg-uninstall} command uninstalls one or more packages that were + previously installed with \l{bpkg-cfg-install(1)}. Underneath, this + command doesn't do much more than run \cb{b uninstall}." + } + + class pkg_uninstall_options: configuration_options + { + "\h|PKG-UNINSTALL OPTIONS|" + }; +} diff --git a/bpkg/pkg-unpack-options.cli b/bpkg/pkg-unpack-options.cli deleted file mode 100644 index f5f2fd5..0000000 --- a/bpkg/pkg-unpack-options.cli +++ /dev/null @@ -1,55 +0,0 @@ -// file : bpkg/pkg-unpack-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-unpack" -"\summary=unpack package archive" - -/* -"\h{SYNOPSIS} - -bpkg pkg-unpack [] |(-e )" - -"\h{DESCRIPTION} - -The \cb{pkg-unpack} command unpacks the archive for the previously -fetched (\cb{pkg-fetch}) package. If the \cb{-e|--existing} option -is used, then instead of the package name, \cb{pkg-unpack} expects -a local path to the existing package source directory. In this case, -\cb{bpkg} will use the directory in place, without copying it to the -configuration or package cache directories. Also, unless the -\cb{-p|--purge} option is specified, \cb{bpkg} will not attempt to -remove this directory when the package is purged with the \cb{pkg-purge} -command. - -If \cb{-e|--existing} is specified together with the \cb{-r|--replace} -option, then \cb{pkg-unpack} will replace the archive and/or source -directory of a package that is already in the \cb{unpacked} or -\cb{fetched} state." -*/ - -namespace bpkg -{ - class pkg_unpack_options: configuration_options - { - bool --existing|-e - { - "Treat the argument as an existing package directory path rather than - package name to unpack." - } - - bool --purge|-p - { - "Remove the existing package directory when the package is purged." - } - - bool --replace|-r - { - "Replace the source directory if the package is already unpacked or - fetched. Can only be specified together with \cb{-e|--existing}." - } - }; -} diff --git a/bpkg/pkg-unpack.cli b/bpkg/pkg-unpack.cli new file mode 100644 index 0000000..847ecb2 --- /dev/null +++ b/bpkg/pkg-unpack.cli @@ -0,0 +1,55 @@ +// file : bpkg/pkg-unpack.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-unpack" +"\summary=unpack package archive" + +/* +"\h{SYNOPSIS} + +bpkg pkg-unpack [] |(-e )" + +"\h{DESCRIPTION} + +The \cb{pkg-unpack} command unpacks the archive for the previously +fetched (\cb{pkg-fetch}) package. If the \cb{-e|--existing} option +is used, then instead of the package name, \cb{pkg-unpack} expects +a local path to the existing package source directory. In this case, +\cb{bpkg} will use the directory in place, without copying it to the +configuration or package cache directories. Also, unless the +\cb{-p|--purge} option is specified, \cb{bpkg} will not attempt to +remove this directory when the package is purged with the \cb{pkg-purge} +command. + +If \cb{-e|--existing} is specified together with the \cb{-r|--replace} +option, then \cb{pkg-unpack} will replace the archive and/or source +directory of a package that is already in the \cb{unpacked} or +\cb{fetched} state." +*/ + +namespace bpkg +{ + class pkg_unpack_options: configuration_options + { + bool --existing|-e + { + "Treat the argument as an existing package directory path rather than + package name to unpack." + } + + bool --purge|-p + { + "Remove the existing package directory when the package is purged." + } + + bool --replace|-r + { + "Replace the source directory if the package is already unpacked or + fetched. Can only be specified together with \cb{-e|--existing}." + } + }; +} diff --git a/bpkg/pkg-update-options.cli b/bpkg/pkg-update-options.cli deleted file mode 100644 index 37d838e..0000000 --- a/bpkg/pkg-update-options.cli +++ /dev/null @@ -1,28 +0,0 @@ -// file : bpkg/pkg-update-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-update" -"\summary=update package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-update ..." - -"\h{DESCRIPTION} - -The \cb{pkg-update} command updates the previously configured -(\cb{pkg-configure}) package. Underneath, this command doesn't -do much more than run (\cb{b update})." -*/ - -namespace bpkg -{ - class pkg_update_options: configuration_options - { - }; -} diff --git a/bpkg/pkg-update.cli b/bpkg/pkg-update.cli new file mode 100644 index 0000000..09a5f59 --- /dev/null +++ b/bpkg/pkg-update.cli @@ -0,0 +1,28 @@ +// file : bpkg/pkg-update.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-update" +"\summary=update package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-update ..." + +"\h{DESCRIPTION} + +The \cb{pkg-update} command updates the previously configured +(\cb{pkg-configure}) package. Underneath, this command doesn't +do much more than run (\cb{b update})." +*/ + +namespace bpkg +{ + class pkg_update_options: configuration_options + { + }; +} diff --git a/bpkg/pkg-verify-options.cli b/bpkg/pkg-verify-options.cli deleted file mode 100644 index 7a94f25..0000000 --- a/bpkg/pkg-verify-options.cli +++ /dev/null @@ -1,40 +0,0 @@ -// file : bpkg/pkg-verify-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-pkg-verify" -"\summary=verify archive is a valid package" - -/* -"\h{SYNOPSIS} - -bpkg pkg-verify " - -"\h{DESCRIPTION} - -The \cb{pkg-verify} command verifies that the specified archive is a -valid \cb{bpkg} package. Specifically, it checks that the archive -contains a valid manifest file and that both the archive's name -and its top-level directory match the canonical - -form." -*/ - -namespace bpkg -{ - class pkg_verify_options: common_options - { - bool --silent - { - "Suppress error messages about the reason why the package is - invalid. Just return the error status." - } - - bool --ignore-unknown - { - "Ignore unknown manifest entries." - } - }; -} diff --git a/bpkg/pkg-verify.cli b/bpkg/pkg-verify.cli new file mode 100644 index 0000000..850b7d4 --- /dev/null +++ b/bpkg/pkg-verify.cli @@ -0,0 +1,40 @@ +// file : bpkg/pkg-verify.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-pkg-verify" +"\summary=verify archive is a valid package" + +/* +"\h{SYNOPSIS} + +bpkg pkg-verify " + +"\h{DESCRIPTION} + +The \cb{pkg-verify} command verifies that the specified archive is a +valid \cb{bpkg} package. Specifically, it checks that the archive +contains a valid manifest file and that both the archive's name +and its top-level directory match the canonical - +form." +*/ + +namespace bpkg +{ + class pkg_verify_options: common_options + { + bool --silent + { + "Suppress error messages about the reason why the package is + invalid. Just return the error status." + } + + bool --ignore-unknown + { + "Ignore unknown manifest entries." + } + }; +} diff --git a/bpkg/rep-create-options.cli b/bpkg/rep-create-options.cli deleted file mode 100644 index 4969dd9..0000000 --- a/bpkg/rep-create-options.cli +++ /dev/null @@ -1,28 +0,0 @@ -// file : bpkg/rep-create-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-rep-create" -"\summary=create repository manifest file" - -namespace bpkg -{ - class rep_create_options: common_options - { - /* - "Create repository manifest file (\cb{packages}) based on the - packages present in the repository directory." - - "Use as the repository root directory instead of the - current working directory." - */ - - bool --ignore-unknown - { - "Ignore unknown manifest entries." - } - }; -} diff --git a/bpkg/rep-create.cli b/bpkg/rep-create.cli new file mode 100644 index 0000000..b472cfc --- /dev/null +++ b/bpkg/rep-create.cli @@ -0,0 +1,28 @@ +// file : bpkg/rep-create.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-rep-create" +"\summary=create repository manifest file" + +namespace bpkg +{ + class rep_create_options: common_options + { + /* + "Create repository manifest file (\cb{packages}) based on the + packages present in the repository directory." + + "Use as the repository root directory instead of the + current working directory." + */ + + bool --ignore-unknown + { + "Ignore unknown manifest entries." + } + }; +} diff --git a/bpkg/rep-info-options.cli b/bpkg/rep-info-options.cli deleted file mode 100644 index 2d8b45e..0000000 --- a/bpkg/rep-info-options.cli +++ /dev/null @@ -1,53 +0,0 @@ -// file : bpkg/rep-info-options.cli -// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -include ; - -"\section=1" -"\name=bpkg-rep-info" -"\summary=print information about repository" - -/* -"\h{SYNOPSIS} - -bpkg rep-info [] " - -"\h{DESCRIPTION} - -The \cb{rep-info} command prints information about the specified repository. -By default it print the repository's name and location as the first line -followed by the list of prerequisite/complement repositories and the list -of available packages. This default behavior, however, can be altered in -various ways using options listed below. Note that the information is -written to \cb{STDOUT}, not \cb{STDERR}." -*/ - -namespace bpkg -{ - class rep_info_options: common_options - { - bool --name|-n - { - "Print the specified repository's name and location." - } - - bool --repositories|-r - { - "Print information about prerequisite/complement repositories." - } - - bool --packages|-p - { - "Print information about available packages." - } - - bool --manifest|-m - { - "Instead of printing the information in the human-readable form, dump - it as manifest(s). Normally you would use this option in combination - with \cb{--packages|-p} or \cb{--repositories|-r} to only dump one - of the manifests." - } - }; -} diff --git a/bpkg/rep-info.cli b/bpkg/rep-info.cli new file mode 100644 index 0000000..0db3004 --- /dev/null +++ b/bpkg/rep-info.cli @@ -0,0 +1,53 @@ +// file : bpkg/rep-info.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bpkg-rep-info" +"\summary=print information about repository" + +/* +"\h{SYNOPSIS} + +bpkg rep-info [] " + +"\h{DESCRIPTION} + +The \cb{rep-info} command prints information about the specified repository. +By default it print the repository's name and location as the first line +followed by the list of prerequisite/complement repositories and the list +of available packages. This default behavior, however, can be altered in +various ways using options listed below. Note that the information is +written to \cb{STDOUT}, not \cb{STDERR}." +*/ + +namespace bpkg +{ + class rep_info_options: common_options + { + bool --name|-n + { + "Print the specified repository's name and location." + } + + bool --repositories|-r + { + "Print information about prerequisite/complement repositories." + } + + bool --packages|-p + { + "Print information about available packages." + } + + bool --manifest|-m + { + "Instead of printing the information in the human-readable form, dump + it as manifest(s). Normally you would use this option in combination + with \cb{--packages|-p} or \cb{--repositories|-r} to only dump one + of the manifests." + } + }; +} diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..ada8beb --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,2 @@ +bpkg*.xhtml +bpkg*.1 diff --git a/doc/cli.sh b/doc/cli.sh new file mode 100755 index 0000000..d022a47 --- /dev/null +++ b/doc/cli.sh @@ -0,0 +1,58 @@ +#! /usr/bin/env bash + +version="0.2.0" +date="XX January 2016" + +trap 'exit 1' ERR +set -o errtrace # Trap in functions. + +function info () { echo "$*" 1>&2; } +function error () { info "$*"; exit 1; } + +while [ $# -gt 0 ]; do + case $1 in + --clean) + rm -f bpkg*.xhtml bpkg*.1 + exit 0 + ;; + *) + error "unexpected $1" + ;; + esac +done + +function compile () +{ + local n=$1; shift + + # Use a bash array to handle empty arguments. + # + local o=() + while [ $# -gt 0 ]; do + o=("${o[@]}" "$1") + shift + done + + cli -I .. -v version="$version" -v date="$date" --include-base-last "${o[@]}" \ +--generate-html --html-prologue-file prologue.xhtml --html-epilogue-file \ +epilogue.xhtml --html-suffix .xhtml ../bpkg/$n.cli + + cli -I .. -v version="$version" -v date="$date" --include-base-last "${o[@]}" \ +--generate-man --man-prologue-file prologue.1 --man-epilogue-file epilogue.1 \ +--man-suffix .1 ../bpkg/$n.cli +} + +o="--output-prefix bpkg- --class-doc bpkg::common_options=short" + +# A few special cases. +# +compile "common" $o --output-suffix "-options" --class-doc bpkg::common_options=long +compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::commands=short --class-doc bpkg::topics=short + +pages="cfg-add cfg-create cfg-fetch help pkg-build pkg-clean pkg-configure \ +pkg-disfigure pkg-drop pkg-fetch pkg-install pkg-purge pkg-status \ +pkg-uninstall pkg-unpack pkg-update pkg-verify rep-create rep-info" + +for p in $pages; do + compile $p $o +done diff --git a/doc/epilogue.1 b/doc/epilogue.1 new file mode 100644 index 0000000..584f1c0 --- /dev/null +++ b/doc/epilogue.1 @@ -0,0 +1,7 @@ +.SH BUGS +Send bug reports to the @@ mailing list. +.SH COPYRIGHT +Copyright (c) 2014-2016 Code Synthesis Ltd + +Permission is granted to copy, distribute and/or modify this document under +the terms of the MIT License. diff --git a/doc/epilogue.xhtml b/doc/epilogue.xhtml new file mode 100644 index 0000000..a835371 --- /dev/null +++ b/doc/epilogue.xhtml @@ -0,0 +1,11 @@ +

BUGS

+ +

Send bug reports to the @@ mailing list.

+ + + + + + + diff --git a/doc/prologue.1 b/doc/prologue.1 new file mode 100644 index 0000000..9a71279 --- /dev/null +++ b/doc/prologue.1 @@ -0,0 +1,6 @@ +.\" Process this file with +.\" groff -man -Tascii $name$.$section$ +.\" +.TH $name$ $section$ "$date$" "bpkg $version$" +.SH NAME +\fB$name$\fR \- $summary$ diff --git a/doc/prologue.xhtml b/doc/prologue.xhtml new file mode 100644 index 0000000..a307d1f --- /dev/null +++ b/doc/prologue.xhtml @@ -0,0 +1,70 @@ + + + + + $name$($section$) bpkg $version$ + + + +
+ +

NAME

+ +

$name$ – $summary$

-- cgit v1.1