File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,24 @@ multi MAIN ('extract', *@components) {
172
172
}
173
173
}
174
174
175
+ # = List known components with clone status
176
+ multi MAIN (' list-components' ) {
177
+ my @ names = $ COMPONENTS . keys . sort ;
178
+ my $ max-length = max (' COMPONENT' . chars , @ names >>. chars );
179
+ my $ format = " %-{ $ max-length } s % s\n " ;
180
+ printf $ format , < COMPONENT STATUS >;
181
+ printf $ format , < --------- ------ >;
182
+
183
+ my $ missing ;
184
+ for @ names -> $ name {
185
+ my $ bare-dir = " $ COMPONENTS_DIR /$ name /$ name .git" ;
186
+ my $ desc = $ bare-dir . IO . d ?? ' cloned' !! do { $ missing ++ ; ' [NOT FOUND]' };
187
+ printf $ format , $ name , $ desc ;
188
+ }
189
+
190
+ say " \n Please run `$ * PROGRAM_NAME setup` to clone missing components." if $ missing ;
191
+ }
192
+
175
193
# = List checked out component trees with matching git revision
176
194
multi MAIN (' list-checkouts' , * @ components ) {
177
195
needs-setup(' list' );
You can’t perform that action at this time.
0 commit comments