@@ -51,17 +51,16 @@ multi MAIN ('setup') {
51
51
}
52
52
53
53
# = Fetch latest commits in each cloned component
54
- multi MAIN (' fetch' ) {
54
+ multi MAIN (' fetch' , * @ components ) {
55
55
needs-setup(' fetch' );
56
56
57
- chdir $ COMPONENTS_DIR ;
58
-
59
- for dir(' .' ). sort -> $ component-name {
60
- say " ==> $ component-name" ;
57
+ for explode-components(@ components , : default-to-dirs) -> $ comp {
58
+ my $ name = $ comp <info ><name >;
59
+ say " ==> $ name" ;
61
60
62
- my $ bare = " $ component- name /$ component- name .git" ;
61
+ my $ bare = " $ name /$ name .git" ;
63
62
unless $ bare . IO . d {
64
- say " No bare repository exists for component $ component- name ; can't fetch updates." ;
63
+ say " No bare repository exists for component $ name ; can't fetch updates." ;
65
64
next ;
66
65
}
67
66
@@ -83,21 +82,20 @@ sub needs-setup ($action) {
83
82
multi MAIN (' extract-releases' , * @ components ) {
84
83
needs-setup(' extract releases' );
85
84
86
- chdir $ COMPONENTS_DIR ;
87
- @ components ||= dir(' .' ). sort ;
85
+ for explode-components(@ components ) -> $ comp {
86
+ my $ name = $ comp <info ><name >;
87
+ say " ==> $ name" ;
88
88
89
- for @ components -> $ component-name {
90
- say " ==> $ component-name" ;
91
- chdir " $ COMPONENTS_DIR /$ component-name" ;
89
+ chdir " $ COMPONENTS_DIR /$ name" ;
92
90
93
- my $ bare = " $ component- name .git" ;
91
+ my $ bare = " $ name .git" ;
94
92
unless $ bare . IO . d {
95
- say " No bare repository exists for component $ component- name ; can't extract releases." ;
93
+ say " No bare repository exists for component $ name ; can't extract releases." ;
96
94
next ;
97
95
}
98
96
99
97
# Determine which release tags to check out by default
100
- my $ tag_regex = $ COMPONENTS { $ component-name } <release_tags >;
98
+ my $ tag_regex = $ comp <release_tags >;
101
99
next unless $ tag_regex ;
102
100
103
101
% * ENV <GIT_DIR > = $ bare ;
@@ -123,10 +121,7 @@ multi MAIN ('extract-releases', *@components) {
123
121
multi MAIN (' build' , * @ components ) {
124
122
needs-setup(' build components' );
125
123
126
- chdir $ COMPONENTS_DIR ;
127
- @ components ||= dir(' .' ). sort ;
128
-
129
- for explode-components(@ components ) -> $ comp {
124
+ for explode-components(@ components , : default-to-dirs) -> $ comp {
130
125
my $ name = $ comp <info ><name >;
131
126
say " ==> $ name" ;
132
127
0 commit comments