aboutsummaryrefslogtreecommitdiff
path: root/bpkg/cfg-info.cli
blob: 8801ec977480f0d5ae7e34cec04038813138c466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// file      : bpkg/cfg-info.cli
// license   : MIT; see accompanying LICENSE file

include <bpkg/configuration.cli>;

"\section=1"
"\name=bpkg-cfg-info"
"\summary=print configuration information"

namespace bpkg
{
  {
    "<options> <dir>",

    "\h|SYNOPSIS|

     \c{\b{bpkg cfg-info} [<options>]}

     \h|DESCRIPTION|

     The \cb{cfg-info} command prints the current configuration's absolute
     path, id, type, and name. If the \cb{--link} and/or \cb{--backlink}
     options are specified, then this information is also printed for each
     linked and/or implicitly backlinked configuration, if any. Note that the
     dangling implicit backlinks are silently skipped, unless \cb{--dangling}
     is specified, in which case this information is also printed for them.
     Note that the information is written to \cb{stdout}, not \cb{stderr}.

     If the \cb{--recursive} option is specified together with \cb{--link}
     and/or \cb{--backlink}, then this information is printed for linked
     and/or implicitly backlinked configuration, recursively.

     The output format is regular with each value printed on a separate line
     and prefixed with the value name. If the \cb{--link}, \cb{--backlink},
     and/or \cb{--dangling} options are specified, then information blocks
     corresponding to linked configurations are separated with blank
     lines. For example:

     \
     path: /path/to/cfg/
     uuid: 8d439f03-7342-4502-8b1c-74b173869478
     type: target
     name: foo

     path: /path/to/host-cfg/
     uuid: 7ee4dab3-07d9-4163-81c0-3779166a7213
     type: host
     name: tools

     path: /path/to/build2-cfg/
     uuid: d453aa2a-92c4-4066-87e4-c8672eed06e1
     type: build2
     name: modules
     \
     "
  }

  class cfg_info_options: configuration_options
  {
    "\h|CFG-INFO OPTIONS|"

    bool --link
    {
      "Print linked configurations."
    }

    bool --backlink
    {
      "Print implicitly backlinked configurations."
    }

    bool --dangling
    {
      "Print dangling implicit backlinks."
    }

    bool --recursive
    {
      "Print linked configurations recursively."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{cfg-info} command the search start directory is
   the configuration directory. The following options files are searched for
   in each directory and, if found, loaded in the order listed:

   \
   bpkg.options
   bpkg-cfg-info.options
   \

   The following \cb{cfg-info} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}