Show More
The requested changes are too big and content was truncated. Show full diff
@@ -1,1395 +1,1422 b'' | |||||
1 | #!/usr/bin/env bash |
|
1 | #!/usr/bin/env bash | |
2 | # This script was generated by bashly 1.0.8 (https://bashly.dannyb.co) |
|
2 | # This script was generated by bashly 1.0.8 (https://bashly.dannyb.co) | |
3 | # Modifying it manually is not recommended |
|
3 | # Modifying it manually is not recommended | |
4 |
|
4 | |||
5 | # :wrapper.bash3_bouncer |
|
5 | # :wrapper.bash3_bouncer | |
6 | if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then |
|
6 | if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then | |
7 | printf "bash version 4 or higher is required\n" >&2 |
|
7 | printf "bash version 4 or higher is required\n" >&2 | |
8 | exit 1 |
|
8 | exit 1 | |
9 | fi |
|
9 | fi | |
10 |
|
10 | |||
11 | # :command.master_script |
|
11 | # :command.master_script | |
12 |
|
12 | |||
13 | # :command.version_command |
|
13 | # :command.version_command | |
14 | version_command() { |
|
14 | version_command() { | |
15 | echo "$version" |
|
15 | echo "$version" | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | # :command.usage |
|
18 | # :command.usage | |
19 | dev_tools_usage() { |
|
19 | dev_tools_usage() { | |
20 | if [[ -n $long_usage ]]; then |
|
20 | if [[ -n $long_usage ]]; then | |
21 | printf "dev-tools - CLI for various dev-tools operation on the stack\n" |
|
21 | printf "dev-tools - CLI for various dev-tools operation on the stack\n" | |
22 | echo |
|
22 | echo | |
23 |
|
23 | |||
24 | else |
|
24 | else | |
25 | printf "dev-tools - CLI for various dev-tools operation on the stack\n" |
|
25 | printf "dev-tools - CLI for various dev-tools operation on the stack\n" | |
26 | echo |
|
26 | echo | |
27 |
|
27 | |||
28 | fi |
|
28 | fi | |
29 |
|
29 | |||
30 | printf "%s\n" "Usage:" |
|
30 | printf "%s\n" "Usage:" | |
31 | printf " dev-tools COMMAND\n" |
|
31 | printf " dev-tools COMMAND\n" | |
32 | printf " dev-tools [COMMAND] --help | -h\n" |
|
32 | printf " dev-tools [COMMAND] --help | -h\n" | |
33 | printf " dev-tools --version | -v\n" |
|
33 | printf " dev-tools --version | -v\n" | |
34 | echo |
|
34 | echo | |
35 | # :command.usage_commands |
|
35 | # :command.usage_commands | |
36 | printf "%s\n" "Commands:" |
|
36 | printf "%s\n" "Commands:" | |
37 | printf " %s run bash console for vcsserver\n" "vcs " |
|
37 | printf " %s run bash console for vcsserver\n" "vcs " | |
38 | printf " %s run bash console for rhodecode-ee\n" "ee " |
|
38 | printf " %s run bash console for rhodecode-ee\n" "ee " | |
39 | printf " %s run bash console for rhodecode-ce\n" "ce " |
|
39 | printf " %s run bash console for rhodecode-ce\n" "ce " | |
40 | printf " %s run bash console for rhodecode-tools-ce\n" "tools " |
|
40 | printf " %s run bash console for rhodecode-tools-ce\n" "tools " | |
41 | printf " %s run bash console for rhodecode-celery\n" "celery " |
|
41 | printf " %s run bash console for rhodecode-celery\n" "celery " | |
42 | printf " %s create dev env required to run vcsserver and rhodecode\n" "dev-env " |
|
42 | printf " %s create dev env required to run vcsserver and rhodecode\n" "dev-env " | |
43 | printf " %s clears docker images\n" "prune " |
|
43 | printf " %s clears docker images\n" "prune " | |
44 | printf " %s clears docker images and system cache, full cleanup. Be cautious !\n" "prune-all " |
|
44 | printf " %s clears docker images and system cache, full cleanup. Be cautious !\n" "prune-all " | |
45 | printf " %s pull latest image of bashly\n" "cli-generate-pull " |
|
45 | printf " %s pull latest image of bashly\n" "cli-generate-pull " | |
46 | printf " %s print out help about bashly\n" "cli-generate-help " |
|
46 | printf " %s print out help about bashly\n" "cli-generate-help " | |
47 | printf " %s run a ./rcstack generation script\n" "stack-cli-generate" |
|
47 | printf " %s run a ./rcstack generation script\n" "stack-cli-generate" | |
48 | printf " %s run a ./dev-tools generation script\n" "dev-cli-generate " |
|
48 | printf " %s run a ./dev-tools generation script\n" "dev-cli-generate " | |
49 | echo |
|
49 | echo | |
50 |
|
50 | |||
51 | # :command.long_usage |
|
51 | # :command.long_usage | |
52 | if [[ -n $long_usage ]]; then |
|
52 | if [[ -n $long_usage ]]; then | |
53 | printf "%s\n" "Options:" |
|
53 | printf "%s\n" "Options:" | |
54 |
|
54 | |||
55 | # :command.usage_fixed_flags |
|
55 | # :command.usage_fixed_flags | |
56 | printf " %s\n" "--help, -h" |
|
56 | printf " %s\n" "--help, -h" | |
57 | printf " Show this help\n" |
|
57 | printf " Show this help\n" | |
58 | echo |
|
58 | echo | |
59 | printf " %s\n" "--version, -v" |
|
59 | printf " %s\n" "--version, -v" | |
60 | printf " Show version number\n" |
|
60 | printf " Show version number\n" | |
61 | echo |
|
61 | echo | |
62 |
|
62 | |||
63 | # :command.footer |
|
63 | # :command.footer | |
64 | printf "RhodeCode Inc 2023\n\n" |
|
64 | printf "RhodeCode Inc 2023\n\n" | |
65 | echo |
|
65 | echo | |
66 |
|
66 | |||
67 | fi |
|
67 | fi | |
68 | } |
|
68 | } | |
69 |
|
69 | |||
70 | # :command.usage |
|
70 | # :command.usage | |
71 | dev_tools_vcs_usage() { |
|
71 | dev_tools_vcs_usage() { | |
72 | if [[ -n $long_usage ]]; then |
|
72 | if [[ -n $long_usage ]]; then | |
73 | printf "dev-tools vcs - run bash console for vcsserver\n" |
|
73 | printf "dev-tools vcs - run bash console for vcsserver\n" | |
74 | echo |
|
74 | echo | |
75 |
|
75 | |||
76 | else |
|
76 | else | |
77 | printf "dev-tools vcs - run bash console for vcsserver\n" |
|
77 | printf "dev-tools vcs - run bash console for vcsserver\n" | |
78 | echo |
|
78 | echo | |
79 |
|
79 | |||
80 | fi |
|
80 | fi | |
81 |
|
81 | |||
82 | printf "Alias: v\n" |
|
82 | printf "Alias: v\n" | |
83 | echo |
|
83 | echo | |
84 |
|
84 | |||
85 | printf "%s\n" "Usage:" |
|
85 | printf "%s\n" "Usage:" | |
86 | printf " dev-tools vcs\n" |
|
86 | printf " dev-tools vcs\n" | |
87 | printf " dev-tools vcs --help | -h\n" |
|
87 | printf " dev-tools vcs --help | -h\n" | |
88 | echo |
|
88 | echo | |
89 |
|
89 | |||
90 | # :command.long_usage |
|
90 | # :command.long_usage | |
91 | if [[ -n $long_usage ]]; then |
|
91 | if [[ -n $long_usage ]]; then | |
92 | printf "%s\n" "Options:" |
|
92 | printf "%s\n" "Options:" | |
93 |
|
93 | |||
94 | # :command.usage_fixed_flags |
|
94 | # :command.usage_fixed_flags | |
95 | printf " %s\n" "--help, -h" |
|
95 | printf " %s\n" "--help, -h" | |
96 | printf " Show this help\n" |
|
96 | printf " Show this help\n" | |
97 | echo |
|
97 | echo | |
98 |
|
98 | |||
99 | fi |
|
99 | fi | |
100 | } |
|
100 | } | |
101 |
|
101 | |||
102 | # :command.usage |
|
102 | # :command.usage | |
103 | dev_tools_ee_usage() { |
|
103 | dev_tools_ee_usage() { | |
104 | if [[ -n $long_usage ]]; then |
|
104 | if [[ -n $long_usage ]]; then | |
105 | printf "dev-tools ee - run bash console for rhodecode-ee\n" |
|
105 | printf "dev-tools ee - run bash console for rhodecode-ee\n" | |
106 | echo |
|
106 | echo | |
107 |
|
107 | |||
108 | else |
|
108 | else | |
109 | printf "dev-tools ee - run bash console for rhodecode-ee\n" |
|
109 | printf "dev-tools ee - run bash console for rhodecode-ee\n" | |
110 | echo |
|
110 | echo | |
111 |
|
111 | |||
112 | fi |
|
112 | fi | |
113 |
|
113 | |||
114 | printf "Alias: e\n" |
|
114 | printf "Alias: e\n" | |
115 | echo |
|
115 | echo | |
116 |
|
116 | |||
117 | printf "%s\n" "Usage:" |
|
117 | printf "%s\n" "Usage:" | |
118 | printf " dev-tools ee\n" |
|
118 | printf " dev-tools ee\n" | |
119 | printf " dev-tools ee --help | -h\n" |
|
119 | printf " dev-tools ee --help | -h\n" | |
120 | echo |
|
120 | echo | |
121 |
|
121 | |||
122 | # :command.long_usage |
|
122 | # :command.long_usage | |
123 | if [[ -n $long_usage ]]; then |
|
123 | if [[ -n $long_usage ]]; then | |
124 | printf "%s\n" "Options:" |
|
124 | printf "%s\n" "Options:" | |
125 |
|
125 | |||
126 | # :command.usage_fixed_flags |
|
126 | # :command.usage_fixed_flags | |
127 | printf " %s\n" "--help, -h" |
|
127 | printf " %s\n" "--help, -h" | |
128 | printf " Show this help\n" |
|
128 | printf " Show this help\n" | |
129 | echo |
|
129 | echo | |
130 |
|
130 | |||
131 | fi |
|
131 | fi | |
132 | } |
|
132 | } | |
133 |
|
133 | |||
134 | # :command.usage |
|
134 | # :command.usage | |
135 | dev_tools_ce_usage() { |
|
135 | dev_tools_ce_usage() { | |
136 | if [[ -n $long_usage ]]; then |
|
136 | if [[ -n $long_usage ]]; then | |
137 | printf "dev-tools ce - run bash console for rhodecode-ce\n" |
|
137 | printf "dev-tools ce - run bash console for rhodecode-ce\n" | |
138 | echo |
|
138 | echo | |
139 |
|
139 | |||
140 | else |
|
140 | else | |
141 | printf "dev-tools ce - run bash console for rhodecode-ce\n" |
|
141 | printf "dev-tools ce - run bash console for rhodecode-ce\n" | |
142 | echo |
|
142 | echo | |
143 |
|
143 | |||
144 | fi |
|
144 | fi | |
145 |
|
145 | |||
146 | printf "Alias: c\n" |
|
146 | printf "Alias: c\n" | |
147 | echo |
|
147 | echo | |
148 |
|
148 | |||
149 | printf "%s\n" "Usage:" |
|
149 | printf "%s\n" "Usage:" | |
150 | printf " dev-tools ce\n" |
|
150 | printf " dev-tools ce\n" | |
151 | printf " dev-tools ce --help | -h\n" |
|
151 | printf " dev-tools ce --help | -h\n" | |
152 | echo |
|
152 | echo | |
153 |
|
153 | |||
154 | # :command.long_usage |
|
154 | # :command.long_usage | |
155 | if [[ -n $long_usage ]]; then |
|
155 | if [[ -n $long_usage ]]; then | |
156 | printf "%s\n" "Options:" |
|
156 | printf "%s\n" "Options:" | |
157 |
|
157 | |||
158 | # :command.usage_fixed_flags |
|
158 | # :command.usage_fixed_flags | |
159 | printf " %s\n" "--help, -h" |
|
159 | printf " %s\n" "--help, -h" | |
160 | printf " Show this help\n" |
|
160 | printf " Show this help\n" | |
161 | echo |
|
161 | echo | |
162 |
|
162 | |||
163 | fi |
|
163 | fi | |
164 | } |
|
164 | } | |
165 |
|
165 | |||
166 | # :command.usage |
|
166 | # :command.usage | |
167 | dev_tools_tools_usage() { |
|
167 | dev_tools_tools_usage() { | |
168 | if [[ -n $long_usage ]]; then |
|
168 | if [[ -n $long_usage ]]; then | |
169 | printf "dev-tools tools - run bash console for rhodecode-tools-ce\n" |
|
169 | printf "dev-tools tools - run bash console for rhodecode-tools-ce\n" | |
170 | echo |
|
170 | echo | |
171 |
|
171 | |||
172 | else |
|
172 | else | |
173 | printf "dev-tools tools - run bash console for rhodecode-tools-ce\n" |
|
173 | printf "dev-tools tools - run bash console for rhodecode-tools-ce\n" | |
174 | echo |
|
174 | echo | |
175 |
|
175 | |||
176 | fi |
|
176 | fi | |
177 |
|
177 | |||
178 | printf "Alias: t\n" |
|
178 | printf "Alias: t\n" | |
179 | echo |
|
179 | echo | |
180 |
|
180 | |||
181 | printf "%s\n" "Usage:" |
|
181 | printf "%s\n" "Usage:" | |
182 | printf " dev-tools tools\n" |
|
182 | printf " dev-tools tools\n" | |
183 | printf " dev-tools tools --help | -h\n" |
|
183 | printf " dev-tools tools --help | -h\n" | |
184 | echo |
|
184 | echo | |
185 |
|
185 | |||
186 | # :command.long_usage |
|
186 | # :command.long_usage | |
187 | if [[ -n $long_usage ]]; then |
|
187 | if [[ -n $long_usage ]]; then | |
188 | printf "%s\n" "Options:" |
|
188 | printf "%s\n" "Options:" | |
189 |
|
189 | |||
190 | # :command.usage_fixed_flags |
|
190 | # :command.usage_fixed_flags | |
191 | printf " %s\n" "--help, -h" |
|
191 | printf " %s\n" "--help, -h" | |
192 | printf " Show this help\n" |
|
192 | printf " Show this help\n" | |
193 | echo |
|
193 | echo | |
194 |
|
194 | |||
195 | fi |
|
195 | fi | |
196 | } |
|
196 | } | |
197 |
|
197 | |||
198 | # :command.usage |
|
198 | # :command.usage | |
199 | dev_tools_celery_usage() { |
|
199 | dev_tools_celery_usage() { | |
200 | if [[ -n $long_usage ]]; then |
|
200 | if [[ -n $long_usage ]]; then | |
201 | printf "dev-tools celery - run bash console for rhodecode-celery\n" |
|
201 | printf "dev-tools celery - run bash console for rhodecode-celery\n" | |
202 | echo |
|
202 | echo | |
203 |
|
203 | |||
204 | else |
|
204 | else | |
205 | printf "dev-tools celery - run bash console for rhodecode-celery\n" |
|
205 | printf "dev-tools celery - run bash console for rhodecode-celery\n" | |
206 | echo |
|
206 | echo | |
207 |
|
207 | |||
208 | fi |
|
208 | fi | |
209 |
|
209 | |||
210 | printf "%s\n" "Usage:" |
|
210 | printf "%s\n" "Usage:" | |
211 | printf " dev-tools celery\n" |
|
211 | printf " dev-tools celery\n" | |
212 | printf " dev-tools celery --help | -h\n" |
|
212 | printf " dev-tools celery --help | -h\n" | |
213 | echo |
|
213 | echo | |
214 |
|
214 | |||
215 | # :command.long_usage |
|
215 | # :command.long_usage | |
216 | if [[ -n $long_usage ]]; then |
|
216 | if [[ -n $long_usage ]]; then | |
217 | printf "%s\n" "Options:" |
|
217 | printf "%s\n" "Options:" | |
218 |
|
218 | |||
219 | # :command.usage_fixed_flags |
|
219 | # :command.usage_fixed_flags | |
220 | printf " %s\n" "--help, -h" |
|
220 | printf " %s\n" "--help, -h" | |
221 | printf " Show this help\n" |
|
221 | printf " Show this help\n" | |
222 | echo |
|
222 | echo | |
223 |
|
223 | |||
224 | fi |
|
224 | fi | |
225 | } |
|
225 | } | |
226 |
|
226 | |||
227 | # :command.usage |
|
227 | # :command.usage | |
228 | dev_tools_dev_env_usage() { |
|
228 | dev_tools_dev_env_usage() { | |
229 | if [[ -n $long_usage ]]; then |
|
229 | if [[ -n $long_usage ]]; then | |
230 | printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n" |
|
230 | printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n" | |
231 | echo |
|
231 | echo | |
232 |
|
232 | |||
233 | else |
|
233 | else | |
234 | printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n" |
|
234 | printf "dev-tools dev-env - create dev env required to run vcsserver and rhodecode\n" | |
235 | echo |
|
235 | echo | |
236 |
|
236 | |||
237 | fi |
|
237 | fi | |
238 |
|
238 | |||
239 | printf "%s\n" "Usage:" |
|
239 | printf "%s\n" "Usage:" | |
240 | printf " dev-tools dev-env\n" |
|
240 | printf " dev-tools dev-env\n" | |
241 | printf " dev-tools dev-env --help | -h\n" |
|
241 | printf " dev-tools dev-env --help | -h\n" | |
242 | echo |
|
242 | echo | |
243 |
|
243 | |||
244 | # :command.long_usage |
|
244 | # :command.long_usage | |
245 | if [[ -n $long_usage ]]; then |
|
245 | if [[ -n $long_usage ]]; then | |
246 | printf "%s\n" "Options:" |
|
246 | printf "%s\n" "Options:" | |
247 |
|
247 | |||
248 | # :command.usage_fixed_flags |
|
248 | # :command.usage_fixed_flags | |
249 | printf " %s\n" "--help, -h" |
|
249 | printf " %s\n" "--help, -h" | |
250 | printf " Show this help\n" |
|
250 | printf " Show this help\n" | |
251 | echo |
|
251 | echo | |
252 |
|
252 | |||
253 | fi |
|
253 | fi | |
254 | } |
|
254 | } | |
255 |
|
255 | |||
256 | # :command.usage |
|
256 | # :command.usage | |
257 | dev_tools_prune_usage() { |
|
257 | dev_tools_prune_usage() { | |
258 | if [[ -n $long_usage ]]; then |
|
258 | if [[ -n $long_usage ]]; then | |
259 | printf "dev-tools prune - clears docker images\n" |
|
259 | printf "dev-tools prune - clears docker images\n" | |
260 | echo |
|
260 | echo | |
261 |
|
261 | |||
262 | else |
|
262 | else | |
263 | printf "dev-tools prune - clears docker images\n" |
|
263 | printf "dev-tools prune - clears docker images\n" | |
264 | echo |
|
264 | echo | |
265 |
|
265 | |||
266 | fi |
|
266 | fi | |
267 |
|
267 | |||
268 | printf "%s\n" "Usage:" |
|
268 | printf "%s\n" "Usage:" | |
269 | printf " dev-tools prune\n" |
|
269 | printf " dev-tools prune\n" | |
270 | printf " dev-tools prune --help | -h\n" |
|
270 | printf " dev-tools prune --help | -h\n" | |
271 | echo |
|
271 | echo | |
272 |
|
272 | |||
273 | # :command.long_usage |
|
273 | # :command.long_usage | |
274 | if [[ -n $long_usage ]]; then |
|
274 | if [[ -n $long_usage ]]; then | |
275 | printf "%s\n" "Options:" |
|
275 | printf "%s\n" "Options:" | |
276 |
|
276 | |||
277 | # :command.usage_fixed_flags |
|
277 | # :command.usage_fixed_flags | |
278 | printf " %s\n" "--help, -h" |
|
278 | printf " %s\n" "--help, -h" | |
279 | printf " Show this help\n" |
|
279 | printf " Show this help\n" | |
280 | echo |
|
280 | echo | |
281 |
|
281 | |||
282 | fi |
|
282 | fi | |
283 | } |
|
283 | } | |
284 |
|
284 | |||
285 | # :command.usage |
|
285 | # :command.usage | |
286 | dev_tools_prune_all_usage() { |
|
286 | dev_tools_prune_all_usage() { | |
287 | if [[ -n $long_usage ]]; then |
|
287 | if [[ -n $long_usage ]]; then | |
288 | printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n" |
|
288 | printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n" | |
289 | echo |
|
289 | echo | |
290 |
|
290 | |||
291 | else |
|
291 | else | |
292 | printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n" |
|
292 | printf "dev-tools prune-all - clears docker images and system cache, full cleanup. Be cautious !\n" | |
293 | echo |
|
293 | echo | |
294 |
|
294 | |||
295 | fi |
|
295 | fi | |
296 |
|
296 | |||
297 | printf "%s\n" "Usage:" |
|
297 | printf "%s\n" "Usage:" | |
298 | printf " dev-tools prune-all\n" |
|
298 | printf " dev-tools prune-all\n" | |
299 | printf " dev-tools prune-all --help | -h\n" |
|
299 | printf " dev-tools prune-all --help | -h\n" | |
300 | echo |
|
300 | echo | |
301 |
|
301 | |||
302 | # :command.long_usage |
|
302 | # :command.long_usage | |
303 | if [[ -n $long_usage ]]; then |
|
303 | if [[ -n $long_usage ]]; then | |
304 | printf "%s\n" "Options:" |
|
304 | printf "%s\n" "Options:" | |
305 |
|
305 | |||
306 | # :command.usage_fixed_flags |
|
306 | # :command.usage_fixed_flags | |
307 | printf " %s\n" "--help, -h" |
|
307 | printf " %s\n" "--help, -h" | |
308 | printf " Show this help\n" |
|
308 | printf " Show this help\n" | |
309 | echo |
|
309 | echo | |
310 |
|
310 | |||
311 | fi |
|
311 | fi | |
312 | } |
|
312 | } | |
313 |
|
313 | |||
314 | # :command.usage |
|
314 | # :command.usage | |
315 | dev_tools_cli_generate_pull_usage() { |
|
315 | dev_tools_cli_generate_pull_usage() { | |
316 | if [[ -n $long_usage ]]; then |
|
316 | if [[ -n $long_usage ]]; then | |
317 | printf "dev-tools cli-generate-pull - pull latest image of bashly\n" |
|
317 | printf "dev-tools cli-generate-pull - pull latest image of bashly\n" | |
318 | echo |
|
318 | echo | |
319 |
|
319 | |||
320 | else |
|
320 | else | |
321 | printf "dev-tools cli-generate-pull - pull latest image of bashly\n" |
|
321 | printf "dev-tools cli-generate-pull - pull latest image of bashly\n" | |
322 | echo |
|
322 | echo | |
323 |
|
323 | |||
324 | fi |
|
324 | fi | |
325 |
|
325 | |||
326 | printf "%s\n" "Usage:" |
|
326 | printf "%s\n" "Usage:" | |
327 | printf " dev-tools cli-generate-pull\n" |
|
327 | printf " dev-tools cli-generate-pull\n" | |
328 | printf " dev-tools cli-generate-pull --help | -h\n" |
|
328 | printf " dev-tools cli-generate-pull --help | -h\n" | |
329 | echo |
|
329 | echo | |
330 |
|
330 | |||
331 | # :command.long_usage |
|
331 | # :command.long_usage | |
332 | if [[ -n $long_usage ]]; then |
|
332 | if [[ -n $long_usage ]]; then | |
333 | printf "%s\n" "Options:" |
|
333 | printf "%s\n" "Options:" | |
334 |
|
334 | |||
335 | # :command.usage_fixed_flags |
|
335 | # :command.usage_fixed_flags | |
336 | printf " %s\n" "--help, -h" |
|
336 | printf " %s\n" "--help, -h" | |
337 | printf " Show this help\n" |
|
337 | printf " Show this help\n" | |
338 | echo |
|
338 | echo | |
339 |
|
339 | |||
340 | fi |
|
340 | fi | |
341 | } |
|
341 | } | |
342 |
|
342 | |||
343 | # :command.usage |
|
343 | # :command.usage | |
344 | dev_tools_cli_generate_help_usage() { |
|
344 | dev_tools_cli_generate_help_usage() { | |
345 | if [[ -n $long_usage ]]; then |
|
345 | if [[ -n $long_usage ]]; then | |
346 | printf "dev-tools cli-generate-help - print out help about bashly\n" |
|
346 | printf "dev-tools cli-generate-help - print out help about bashly\n" | |
347 | echo |
|
347 | echo | |
348 |
|
348 | |||
349 | else |
|
349 | else | |
350 | printf "dev-tools cli-generate-help - print out help about bashly\n" |
|
350 | printf "dev-tools cli-generate-help - print out help about bashly\n" | |
351 | echo |
|
351 | echo | |
352 |
|
352 | |||
353 | fi |
|
353 | fi | |
354 |
|
354 | |||
355 | printf "%s\n" "Usage:" |
|
355 | printf "%s\n" "Usage:" | |
356 | printf " dev-tools cli-generate-help\n" |
|
356 | printf " dev-tools cli-generate-help\n" | |
357 | printf " dev-tools cli-generate-help --help | -h\n" |
|
357 | printf " dev-tools cli-generate-help --help | -h\n" | |
358 | echo |
|
358 | echo | |
359 |
|
359 | |||
360 | # :command.long_usage |
|
360 | # :command.long_usage | |
361 | if [[ -n $long_usage ]]; then |
|
361 | if [[ -n $long_usage ]]; then | |
362 | printf "%s\n" "Options:" |
|
362 | printf "%s\n" "Options:" | |
363 |
|
363 | |||
364 | # :command.usage_fixed_flags |
|
364 | # :command.usage_fixed_flags | |
365 | printf " %s\n" "--help, -h" |
|
365 | printf " %s\n" "--help, -h" | |
366 | printf " Show this help\n" |
|
366 | printf " Show this help\n" | |
367 | echo |
|
367 | echo | |
368 |
|
368 | |||
369 | fi |
|
369 | fi | |
370 | } |
|
370 | } | |
371 |
|
371 | |||
372 | # :command.usage |
|
372 | # :command.usage | |
373 | dev_tools_stack_cli_generate_usage() { |
|
373 | dev_tools_stack_cli_generate_usage() { | |
374 | if [[ -n $long_usage ]]; then |
|
374 | if [[ -n $long_usage ]]; then | |
375 | printf "dev-tools stack-cli-generate - run a ./rcstack generation script\n" |
|
375 | printf "dev-tools stack-cli-generate - run a ./rcstack generation script\n" | |
376 | echo |
|
376 | echo | |
377 |
|
377 | |||
378 | else |
|
378 | else | |
379 | printf "dev-tools stack-cli-generate - run a ./rcstack generation script\n" |
|
379 | printf "dev-tools stack-cli-generate - run a ./rcstack generation script\n" | |
380 | echo |
|
380 | echo | |
381 |
|
381 | |||
382 | fi |
|
382 | fi | |
383 |
|
383 | |||
384 | printf "%s\n" "Usage:" |
|
384 | printf "%s\n" "Usage:" | |
385 | printf " dev-tools stack-cli-generate [OPTIONS]\n" |
|
385 | printf " dev-tools stack-cli-generate [OPTIONS]\n" | |
386 | printf " dev-tools stack-cli-generate --help | -h\n" |
|
386 | printf " dev-tools stack-cli-generate --help | -h\n" | |
387 | echo |
|
387 | echo | |
388 |
|
388 | |||
389 | # :command.long_usage |
|
389 | # :command.long_usage | |
390 | if [[ -n $long_usage ]]; then |
|
390 | if [[ -n $long_usage ]]; then | |
391 | printf "%s\n" "Options:" |
|
391 | printf "%s\n" "Options:" | |
392 |
|
392 | |||
393 | # :command.usage_flags |
|
393 | # :command.usage_flags | |
394 | # :flag.usage |
|
394 | # :flag.usage | |
395 | printf " %s\n" "--one-time, -o" |
|
395 | printf " %s\n" "--one-time, -o" | |
396 | printf " run the command a single time without watch\n" |
|
396 | printf " run the command a single time without watch\n" | |
397 | echo |
|
397 | echo | |
398 |
|
398 | |||
399 | # :command.usage_fixed_flags |
|
399 | # :command.usage_fixed_flags | |
400 | printf " %s\n" "--help, -h" |
|
400 | printf " %s\n" "--help, -h" | |
401 | printf " Show this help\n" |
|
401 | printf " Show this help\n" | |
402 | echo |
|
402 | echo | |
403 |
|
403 | |||
404 | fi |
|
404 | fi | |
405 | } |
|
405 | } | |
406 |
|
406 | |||
407 | # :command.usage |
|
407 | # :command.usage | |
408 | dev_tools_dev_cli_generate_usage() { |
|
408 | dev_tools_dev_cli_generate_usage() { | |
409 | if [[ -n $long_usage ]]; then |
|
409 | if [[ -n $long_usage ]]; then | |
410 | printf "dev-tools dev-cli-generate - run a ./dev-tools generation script\n" |
|
410 | printf "dev-tools dev-cli-generate - run a ./dev-tools generation script\n" | |
411 | echo |
|
411 | echo | |
412 |
|
412 | |||
413 | else |
|
413 | else | |
414 | printf "dev-tools dev-cli-generate - run a ./dev-tools generation script\n" |
|
414 | printf "dev-tools dev-cli-generate - run a ./dev-tools generation script\n" | |
415 | echo |
|
415 | echo | |
416 |
|
416 | |||
417 | fi |
|
417 | fi | |
418 |
|
418 | |||
419 | printf "%s\n" "Usage:" |
|
419 | printf "%s\n" "Usage:" | |
420 | printf " dev-tools dev-cli-generate [OPTIONS]\n" |
|
420 | printf " dev-tools dev-cli-generate [OPTIONS]\n" | |
421 | printf " dev-tools dev-cli-generate --help | -h\n" |
|
421 | printf " dev-tools dev-cli-generate --help | -h\n" | |
422 | echo |
|
422 | echo | |
423 |
|
423 | |||
424 | # :command.long_usage |
|
424 | # :command.long_usage | |
425 | if [[ -n $long_usage ]]; then |
|
425 | if [[ -n $long_usage ]]; then | |
426 | printf "%s\n" "Options:" |
|
426 | printf "%s\n" "Options:" | |
427 |
|
427 | |||
428 | # :command.usage_flags |
|
428 | # :command.usage_flags | |
429 | # :flag.usage |
|
429 | # :flag.usage | |
430 | printf " %s\n" "--one-time, -o" |
|
430 | printf " %s\n" "--one-time, -o" | |
431 | printf " run the command a single time without watch\n" |
|
431 | printf " run the command a single time without watch\n" | |
432 | echo |
|
432 | echo | |
433 |
|
433 | |||
434 | # :command.usage_fixed_flags |
|
434 | # :command.usage_fixed_flags | |
435 | printf " %s\n" "--help, -h" |
|
435 | printf " %s\n" "--help, -h" | |
436 | printf " Show this help\n" |
|
436 | printf " Show this help\n" | |
437 | echo |
|
437 | echo | |
438 |
|
438 | |||
439 | fi |
|
439 | fi | |
440 | } |
|
440 | } | |
441 |
|
441 | |||
442 | # :command.normalize_input |
|
442 | # :command.normalize_input | |
443 | normalize_input() { |
|
443 | normalize_input() { | |
444 | local arg flags |
|
444 | local arg flags | |
445 |
|
445 | |||
446 | while [[ $# -gt 0 ]]; do |
|
446 | while [[ $# -gt 0 ]]; do | |
447 | arg="$1" |
|
447 | arg="$1" | |
448 | if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then |
|
448 | if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then | |
449 | input+=("${BASH_REMATCH[1]}") |
|
449 | input+=("${BASH_REMATCH[1]}") | |
450 | input+=("${BASH_REMATCH[2]}") |
|
450 | input+=("${BASH_REMATCH[2]}") | |
451 | elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then |
|
451 | elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then | |
452 | input+=("${BASH_REMATCH[1]}") |
|
452 | input+=("${BASH_REMATCH[1]}") | |
453 | input+=("${BASH_REMATCH[2]}") |
|
453 | input+=("${BASH_REMATCH[2]}") | |
454 | elif [[ $arg =~ ^-([a-zA-Z0-9][a-zA-Z0-9]+)$ ]]; then |
|
454 | elif [[ $arg =~ ^-([a-zA-Z0-9][a-zA-Z0-9]+)$ ]]; then | |
455 | flags="${BASH_REMATCH[1]}" |
|
455 | flags="${BASH_REMATCH[1]}" | |
456 | for ((i = 0; i < ${#flags}; i++)); do |
|
456 | for ((i = 0; i < ${#flags}; i++)); do | |
457 | input+=("-${flags:i:1}") |
|
457 | input+=("-${flags:i:1}") | |
458 | done |
|
458 | done | |
459 | else |
|
459 | else | |
460 | input+=("$arg") |
|
460 | input+=("$arg") | |
461 | fi |
|
461 | fi | |
462 |
|
462 | |||
463 | shift |
|
463 | shift | |
464 | done |
|
464 | done | |
465 | } |
|
465 | } | |
466 | # :command.inspect_args |
|
466 | # :command.inspect_args | |
467 | inspect_args() { |
|
467 | inspect_args() { | |
468 | if ((${#args[@]})); then |
|
468 | if ((${#args[@]})); then | |
469 | readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) |
|
469 | readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) | |
470 | echo args: |
|
470 | echo args: | |
471 | for k in "${sorted_keys[@]}"; do echo "- \${args[$k]} = ${args[$k]}"; done |
|
471 | for k in "${sorted_keys[@]}"; do echo "- \${args[$k]} = ${args[$k]}"; done | |
472 | else |
|
472 | else | |
473 | echo args: none |
|
473 | echo args: none | |
474 | fi |
|
474 | fi | |
475 |
|
475 | |||
476 | if ((${#other_args[@]})); then |
|
476 | if ((${#other_args[@]})); then | |
477 | echo |
|
477 | echo | |
478 | echo other_args: |
|
478 | echo other_args: | |
479 | echo "- \${other_args[*]} = ${other_args[*]}" |
|
479 | echo "- \${other_args[*]} = ${other_args[*]}" | |
480 | for i in "${!other_args[@]}"; do |
|
480 | for i in "${!other_args[@]}"; do | |
481 | echo "- \${other_args[$i]} = ${other_args[$i]}" |
|
481 | echo "- \${other_args[$i]} = ${other_args[$i]}" | |
482 | done |
|
482 | done | |
483 | fi |
|
483 | fi | |
484 |
|
484 | |||
485 | if ((${#deps[@]})); then |
|
485 | if ((${#deps[@]})); then | |
486 | readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) |
|
486 | readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) | |
487 | echo |
|
487 | echo | |
488 | echo deps: |
|
488 | echo deps: | |
489 | for k in "${sorted_keys[@]}"; do echo "- \${deps[$k]} = ${deps[$k]}"; done |
|
489 | for k in "${sorted_keys[@]}"; do echo "- \${deps[$k]} = ${deps[$k]}"; done | |
490 | fi |
|
490 | fi | |
491 |
|
491 | |||
492 | } |
|
492 | } | |
493 |
|
493 | |||
494 | # :command.command_functions |
|
494 | # :command.command_functions | |
495 | # :command.function |
|
495 | # :command.function | |
496 | dev_tools_vcs_command() { |
|
496 | dev_tools_vcs_command() { | |
497 | # src/vcs_command.sh |
|
497 | # src/vcs_command.sh | |
498 | container_name=dev-vcsserver |
|
498 | container_name=dev-vcsserver | |
499 |
|
499 | |||
500 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found |
|
500 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found | |
501 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name |
|
501 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name | |
502 |
|
502 | |||
|
503 | if [[ -v WORKSPACE_HOME ]]; | |||
|
504 | then | |||
|
505 | DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME | |||
|
506 | else | |||
|
507 | DEFAULT_WORKSPACE_HOME=/media/psf/Home/workspace | |||
|
508 | fi | |||
|
509 | ||||
|
510 | echo "Using default workspace path: $DEFAULT_WORKSPACE_HOME" | |||
|
511 | ||||
503 | eval " |
|
512 | eval " | |
504 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ |
|
513 | WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ | |
505 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --publish 10010:10010 --rm --use-aliases \ |
|
514 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --publish 10010:10010 --rm --use-aliases \ | |
506 | --workdir=\"/home/rhodecode/rhodecode-vcsserver\" \ |
|
515 | --workdir=\"/home/rhodecode/rhodecode-vcsserver\" \ | |
507 | --name=\"$container_name\" vcsserver bash" |
|
516 | --name=\"$container_name\" vcsserver bash" | |
508 | } |
|
517 | } | |
509 |
|
518 | |||
510 | # :command.function |
|
519 | # :command.function | |
511 | dev_tools_ee_command() { |
|
520 | dev_tools_ee_command() { | |
512 | # src/ee_command.sh |
|
521 | # src/ee_command.sh | |
513 | container_name=dev-enterprise-ee |
|
522 | container_name=dev-enterprise-ee | |
514 |
|
523 | |||
515 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found |
|
524 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found | |
516 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop $container_name && docker rm -fv $container_name |
|
525 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop $container_name && docker rm -fv $container_name | |
517 |
|
526 | |||
|
527 | if [[ -v WORKSPACE_HOME ]]; | |||
|
528 | then | |||
|
529 | DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME | |||
|
530 | else | |||
|
531 | DEFAULT_WORKSPACE_HOME=/media/psf/Home/workspace | |||
|
532 | fi | |||
|
533 | ||||
|
534 | echo "Using default workspace path: $DEFAULT_WORKSPACE_HOME" | |||
|
535 | ||||
518 | eval " |
|
536 | eval " | |
519 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ |
|
537 | WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ | |
520 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --rm --use-aliases \ |
|
538 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --rm --use-aliases \ | |
521 | --publish 10020:10020 \ |
|
539 | --publish 10020:10020 \ | |
522 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ee\" \ |
|
540 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ee\" \ | |
523 | --name=\"$container_name\" rhodecode bash" |
|
541 | --name=\"$container_name\" rhodecode bash" | |
524 |
|
542 | |||
525 | } |
|
543 | } | |
526 |
|
544 | |||
527 | # :command.function |
|
545 | # :command.function | |
528 | dev_tools_ce_command() { |
|
546 | dev_tools_ce_command() { | |
529 | # src/ce_command.sh |
|
547 | # src/ce_command.sh | |
530 | container_name=dev-enterprise-ce |
|
548 | container_name=dev-enterprise-ce | |
531 |
|
549 | |||
532 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found |
|
550 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found | |
533 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name |
|
551 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name | |
534 |
|
552 | |||
|
553 | if [[ -v WORKSPACE_HOME ]]; | |||
|
554 | then | |||
|
555 | DEFAULT_WORKSPACE_HOME=$WORKSPACE_HOME | |||
|
556 | else | |||
|
557 | DEFAULT_WORKSPACE_HOME=/media/psf/Home/workspace | |||
|
558 | fi | |||
|
559 | ||||
|
560 | echo "Using default workspace path: $DEFAULT_WORKSPACE_HOME" | |||
|
561 | ||||
535 | eval " |
|
562 | eval " | |
536 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ |
|
563 | WORKSPACE_HOME=$DEFAULT_WORKSPACE_HOME ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ | |
537 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --publish 10020:10020 --rm --use-aliases \ |
|
564 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --publish 10020:10020 --rm --use-aliases \ | |
538 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \ |
|
565 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \ | |
539 | --name=\"$container_name\" rhodecode bash" |
|
566 | --name=\"$container_name\" rhodecode bash" | |
540 | } |
|
567 | } | |
541 |
|
568 | |||
542 | # :command.function |
|
569 | # :command.function | |
543 | dev_tools_tools_command() { |
|
570 | dev_tools_tools_command() { | |
544 | # src/tools_command.sh |
|
571 | # src/tools_command.sh | |
545 | container_name=dev-tools |
|
572 | container_name=dev-tools | |
546 |
|
573 | |||
547 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found |
|
574 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found | |
548 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name |
|
575 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop -t 120 $container_name && docker rm -fv $container_name | |
549 |
|
576 | |||
550 | eval " |
|
577 | eval " | |
551 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ |
|
578 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ | |
552 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_tools_bash --rm --use-aliases \ |
|
579 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_tools_bash --rm --use-aliases \ | |
553 | --workdir=\"/home/rhodecode/rhodecode-tools-ce\" \ |
|
580 | --workdir=\"/home/rhodecode/rhodecode-tools-ce\" \ | |
554 | --name=\"$container_name\" vcsserver bash" |
|
581 | --name=\"$container_name\" vcsserver bash" | |
555 |
|
582 | |||
556 | } |
|
583 | } | |
557 |
|
584 | |||
558 | # :command.function |
|
585 | # :command.function | |
559 | dev_tools_celery_command() { |
|
586 | dev_tools_celery_command() { | |
560 | # src/celery_command.sh |
|
587 | # src/celery_command.sh | |
561 | container_name=dev-celery |
|
588 | container_name=dev-celery | |
562 |
|
589 | |||
563 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found |
|
590 | docker ps -q --filter "name=$container_name" | grep -q . && echo $container_name found || echo $container_name not found | |
564 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop $container_name && docker rm -fv $container_name |
|
591 | docker ps -q --filter "name=$container_name" | grep -q . && docker stop $container_name && docker rm -fv $container_name | |
565 |
|
592 | |||
566 | eval " |
|
593 | eval " | |
567 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ |
|
594 | ./rcstack stack --env-file-path .custom/.dev.env rhodecode -f docker-compose-apps.dev.yaml \ | |
568 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --rm --use-aliases \ |
|
595 | run -e ENV_FILE= -e RC_ENV_FILE= -e RC_APP_TYPE=rhodecode_bash --rm --use-aliases \ | |
569 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \ |
|
596 | --workdir=\"/home/rhodecode/rhodecode-enterprise-ce\" \ | |
570 | --name=\"$container_name\" rhodecode bash" |
|
597 | --name=\"$container_name\" rhodecode bash" | |
571 |
|
598 | |||
572 | } |
|
599 | } | |
573 |
|
600 | |||
574 | # :command.function |
|
601 | # :command.function | |
575 | dev_tools_dev_env_command() { |
|
602 | dev_tools_dev_env_command() { | |
576 | # src/dev_env_command.sh |
|
603 | # src/dev_env_command.sh | |
577 | eval " \ |
|
604 | eval " \ | |
578 | ./rcstack stack metrics up --detach statsd-exporter && \ |
|
605 | ./rcstack stack metrics up --detach statsd-exporter && \ | |
579 | ./rcstack stack services up --detach && \ |
|
606 | ./rcstack stack services up --detach && \ | |
580 | ./rcstack stack rhodecode up --detach svn celery celery-beat && \ |
|
607 | ./rcstack stack rhodecode up --detach svn celery celery-beat && \ | |
581 | ./rcstack stack services up --detach httpbin && \ |
|
608 | ./rcstack stack services up --detach httpbin && \ | |
582 | ./rcstack stack services up --detach ldap-server && \ |
|
609 | ./rcstack stack services up --detach ldap-server && \ | |
583 | ./rcstack status" |
|
610 | ./rcstack status" | |
584 | } |
|
611 | } | |
585 |
|
612 | |||
586 | # :command.function |
|
613 | # :command.function | |
587 | dev_tools_prune_command() { |
|
614 | dev_tools_prune_command() { | |
588 | # src/prune_command.sh |
|
615 | # src/prune_command.sh | |
589 | docker container prune -f |
|
616 | docker container prune -f | |
590 | docker image prune -f |
|
617 | docker image prune -f | |
591 | docker builder prune -f |
|
618 | docker builder prune -f | |
592 | docker system df |
|
619 | docker system df | |
593 | } |
|
620 | } | |
594 |
|
621 | |||
595 | # :command.function |
|
622 | # :command.function | |
596 | dev_tools_prune_all_command() { |
|
623 | dev_tools_prune_all_command() { | |
597 | # src/prune_all_command.sh |
|
624 | # src/prune_all_command.sh | |
598 | docker container prune -f |
|
625 | docker container prune -f | |
599 | docker image prune -f |
|
626 | docker image prune -f | |
600 | docker builder prune -f |
|
627 | docker builder prune -f | |
601 | docker system prune -f |
|
628 | docker system prune -f | |
602 | docker system df |
|
629 | docker system df | |
603 | } |
|
630 | } | |
604 |
|
631 | |||
605 | # :command.function |
|
632 | # :command.function | |
606 | dev_tools_cli_generate_pull_command() { |
|
633 | dev_tools_cli_generate_pull_command() { | |
607 | # src/cli_generate_pull_command.sh |
|
634 | # src/cli_generate_pull_command.sh | |
608 | docker pull $bashly_image |
|
635 | docker pull $bashly_image | |
609 | } |
|
636 | } | |
610 |
|
637 | |||
611 | # :command.function |
|
638 | # :command.function | |
612 | dev_tools_cli_generate_help_command() { |
|
639 | dev_tools_cli_generate_help_command() { | |
613 | # src/cli_generate_help_command.sh |
|
640 | # src/cli_generate_help_command.sh | |
614 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools |
|
641 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools | |
615 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools |
|
642 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools | |
616 |
|
643 | |||
617 | echo "To pull latest image:" |
|
644 | echo "To pull latest image:" | |
618 | echo " docker pull $bashly_image" |
|
645 | echo " docker pull $bashly_image" | |
619 |
|
646 | |||
620 | echo "To run generation manually:" |
|
647 | echo "To run generation manually:" | |
621 | echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate" |
|
648 | echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate" | |
622 |
|
649 | |||
623 | echo "To upgrade builting scripts:" |
|
650 | echo "To upgrade builting scripts:" | |
624 | echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade" |
|
651 | echo " docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade" | |
625 |
|
652 | |||
626 | #bashly generate --upgrade |
|
653 | #bashly generate --upgrade | |
627 |
|
654 | |||
628 | # bashly add completions_script && source ./completions.bash |
|
655 | # bashly add completions_script && source ./completions.bash | |
629 |
|
656 | |||
630 | #alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge' |
|
657 | #alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge' | |
631 | } |
|
658 | } | |
632 |
|
659 | |||
633 | # :command.function |
|
660 | # :command.function | |
634 | dev_tools_stack_cli_generate_command() { |
|
661 | dev_tools_stack_cli_generate_command() { | |
635 | # src/stack_cli_generate_command.sh |
|
662 | # src/stack_cli_generate_command.sh | |
636 | one_time=${args[--one-time]} |
|
663 | one_time=${args[--one-time]} | |
637 |
|
664 | |||
638 | echo "Using scripts/scripts/rcstack/bashly.yaml @ $bashly_image" |
|
665 | echo "Using scripts/scripts/rcstack/bashly.yaml @ $bashly_image" | |
639 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/rcstack |
|
666 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/rcstack | |
640 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/rcstack |
|
667 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/rcstack | |
641 |
|
668 | |||
642 | if [[ $one_time ]]; then |
|
669 | if [[ $one_time ]]; then | |
643 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade |
|
670 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade | |
644 | else |
|
671 | else | |
645 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch |
|
672 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch | |
646 | fi |
|
673 | fi | |
647 |
|
674 | |||
648 | } |
|
675 | } | |
649 |
|
676 | |||
650 | # :command.function |
|
677 | # :command.function | |
651 | dev_tools_dev_cli_generate_command() { |
|
678 | dev_tools_dev_cli_generate_command() { | |
652 | # src/dev_cli_generate_command.sh |
|
679 | # src/dev_cli_generate_command.sh | |
653 | one_time=${args[--one-time]} |
|
680 | one_time=${args[--one-time]} | |
654 |
|
681 | |||
655 | echo "Using scripts/dev-tools/bashly.yaml @ $bashly_image" |
|
682 | echo "Using scripts/dev-tools/bashly.yaml @ $bashly_image" | |
656 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools |
|
683 | source_dir=/media/psf/Home/workspace/rcstack-cli-modules/dev-tools | |
657 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools |
|
684 | target_dir=/media/psf/Home/workspace/rhodecode-docker/scripts/dev-tools | |
658 |
|
685 | |||
659 | if [[ $one_time ]]; then |
|
686 | if [[ $one_time ]]; then | |
660 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade |
|
687 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --upgrade | |
661 | else |
|
688 | else | |
662 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch |
|
689 | docker run --rm -it --user $(id -u):$(id -g) --volume "$source_dir:/app" --volume "$target_dir:/dest" -e BASHLY_TARGET_DIR=/dest $bashly_image generate --watch | |
663 | fi |
|
690 | fi | |
664 |
|
691 | |||
665 | } |
|
692 | } | |
666 |
|
693 | |||
667 | # :command.parse_requirements |
|
694 | # :command.parse_requirements | |
668 | parse_requirements() { |
|
695 | parse_requirements() { | |
669 | # :command.fixed_flags_filter |
|
696 | # :command.fixed_flags_filter | |
670 | while [[ $# -gt 0 ]]; do |
|
697 | while [[ $# -gt 0 ]]; do | |
671 | case "${1:-}" in |
|
698 | case "${1:-}" in | |
672 | --version | -v) |
|
699 | --version | -v) | |
673 | version_command |
|
700 | version_command | |
674 | exit |
|
701 | exit | |
675 | ;; |
|
702 | ;; | |
676 |
|
703 | |||
677 | --help | -h) |
|
704 | --help | -h) | |
678 | long_usage=yes |
|
705 | long_usage=yes | |
679 | dev_tools_usage |
|
706 | dev_tools_usage | |
680 | exit |
|
707 | exit | |
681 | ;; |
|
708 | ;; | |
682 |
|
709 | |||
683 | *) |
|
710 | *) | |
684 | break |
|
711 | break | |
685 | ;; |
|
712 | ;; | |
686 |
|
713 | |||
687 | esac |
|
714 | esac | |
688 | done |
|
715 | done | |
689 |
|
716 | |||
690 | # :command.command_filter |
|
717 | # :command.command_filter | |
691 | action=${1:-} |
|
718 | action=${1:-} | |
692 |
|
719 | |||
693 | case $action in |
|
720 | case $action in | |
694 | -*) ;; |
|
721 | -*) ;; | |
695 |
|
722 | |||
696 | vcs | v) |
|
723 | vcs | v) | |
697 | action="vcs" |
|
724 | action="vcs" | |
698 | shift |
|
725 | shift | |
699 | dev_tools_vcs_parse_requirements "$@" |
|
726 | dev_tools_vcs_parse_requirements "$@" | |
700 | shift $# |
|
727 | shift $# | |
701 | ;; |
|
728 | ;; | |
702 |
|
729 | |||
703 | ee | e) |
|
730 | ee | e) | |
704 | action="ee" |
|
731 | action="ee" | |
705 | shift |
|
732 | shift | |
706 | dev_tools_ee_parse_requirements "$@" |
|
733 | dev_tools_ee_parse_requirements "$@" | |
707 | shift $# |
|
734 | shift $# | |
708 | ;; |
|
735 | ;; | |
709 |
|
736 | |||
710 | ce | c) |
|
737 | ce | c) | |
711 | action="ce" |
|
738 | action="ce" | |
712 | shift |
|
739 | shift | |
713 | dev_tools_ce_parse_requirements "$@" |
|
740 | dev_tools_ce_parse_requirements "$@" | |
714 | shift $# |
|
741 | shift $# | |
715 | ;; |
|
742 | ;; | |
716 |
|
743 | |||
717 | tools | t) |
|
744 | tools | t) | |
718 | action="tools" |
|
745 | action="tools" | |
719 | shift |
|
746 | shift | |
720 | dev_tools_tools_parse_requirements "$@" |
|
747 | dev_tools_tools_parse_requirements "$@" | |
721 | shift $# |
|
748 | shift $# | |
722 | ;; |
|
749 | ;; | |
723 |
|
750 | |||
724 | celery) |
|
751 | celery) | |
725 | action="celery" |
|
752 | action="celery" | |
726 | shift |
|
753 | shift | |
727 | dev_tools_celery_parse_requirements "$@" |
|
754 | dev_tools_celery_parse_requirements "$@" | |
728 | shift $# |
|
755 | shift $# | |
729 | ;; |
|
756 | ;; | |
730 |
|
757 | |||
731 | dev-env) |
|
758 | dev-env) | |
732 | action="dev-env" |
|
759 | action="dev-env" | |
733 | shift |
|
760 | shift | |
734 | dev_tools_dev_env_parse_requirements "$@" |
|
761 | dev_tools_dev_env_parse_requirements "$@" | |
735 | shift $# |
|
762 | shift $# | |
736 | ;; |
|
763 | ;; | |
737 |
|
764 | |||
738 | prune) |
|
765 | prune) | |
739 | action="prune" |
|
766 | action="prune" | |
740 | shift |
|
767 | shift | |
741 | dev_tools_prune_parse_requirements "$@" |
|
768 | dev_tools_prune_parse_requirements "$@" | |
742 | shift $# |
|
769 | shift $# | |
743 | ;; |
|
770 | ;; | |
744 |
|
771 | |||
745 | prune-all) |
|
772 | prune-all) | |
746 | action="prune-all" |
|
773 | action="prune-all" | |
747 | shift |
|
774 | shift | |
748 | dev_tools_prune_all_parse_requirements "$@" |
|
775 | dev_tools_prune_all_parse_requirements "$@" | |
749 | shift $# |
|
776 | shift $# | |
750 | ;; |
|
777 | ;; | |
751 |
|
778 | |||
752 | cli-generate-pull) |
|
779 | cli-generate-pull) | |
753 | action="cli-generate-pull" |
|
780 | action="cli-generate-pull" | |
754 | shift |
|
781 | shift | |
755 | dev_tools_cli_generate_pull_parse_requirements "$@" |
|
782 | dev_tools_cli_generate_pull_parse_requirements "$@" | |
756 | shift $# |
|
783 | shift $# | |
757 | ;; |
|
784 | ;; | |
758 |
|
785 | |||
759 | cli-generate-help) |
|
786 | cli-generate-help) | |
760 | action="cli-generate-help" |
|
787 | action="cli-generate-help" | |
761 | shift |
|
788 | shift | |
762 | dev_tools_cli_generate_help_parse_requirements "$@" |
|
789 | dev_tools_cli_generate_help_parse_requirements "$@" | |
763 | shift $# |
|
790 | shift $# | |
764 | ;; |
|
791 | ;; | |
765 |
|
792 | |||
766 | stack-cli-generate) |
|
793 | stack-cli-generate) | |
767 | action="stack-cli-generate" |
|
794 | action="stack-cli-generate" | |
768 | shift |
|
795 | shift | |
769 | dev_tools_stack_cli_generate_parse_requirements "$@" |
|
796 | dev_tools_stack_cli_generate_parse_requirements "$@" | |
770 | shift $# |
|
797 | shift $# | |
771 | ;; |
|
798 | ;; | |
772 |
|
799 | |||
773 | dev-cli-generate) |
|
800 | dev-cli-generate) | |
774 | action="dev-cli-generate" |
|
801 | action="dev-cli-generate" | |
775 | shift |
|
802 | shift | |
776 | dev_tools_dev_cli_generate_parse_requirements "$@" |
|
803 | dev_tools_dev_cli_generate_parse_requirements "$@" | |
777 | shift $# |
|
804 | shift $# | |
778 | ;; |
|
805 | ;; | |
779 |
|
806 | |||
780 | # :command.command_fallback |
|
807 | # :command.command_fallback | |
781 | "") |
|
808 | "") | |
782 | dev_tools_usage >&2 |
|
809 | dev_tools_usage >&2 | |
783 | exit 1 |
|
810 | exit 1 | |
784 | ;; |
|
811 | ;; | |
785 |
|
812 | |||
786 | *) |
|
813 | *) | |
787 | printf "invalid command: %s\n" "$action" >&2 |
|
814 | printf "invalid command: %s\n" "$action" >&2 | |
788 | exit 1 |
|
815 | exit 1 | |
789 | ;; |
|
816 | ;; | |
790 |
|
817 | |||
791 | esac |
|
818 | esac | |
792 |
|
819 | |||
793 | # :command.parse_requirements_while |
|
820 | # :command.parse_requirements_while | |
794 | while [[ $# -gt 0 ]]; do |
|
821 | while [[ $# -gt 0 ]]; do | |
795 | key="$1" |
|
822 | key="$1" | |
796 | case "$key" in |
|
823 | case "$key" in | |
797 |
|
824 | |||
798 | -?*) |
|
825 | -?*) | |
799 | printf "invalid option: %s\n" "$key" >&2 |
|
826 | printf "invalid option: %s\n" "$key" >&2 | |
800 | exit 1 |
|
827 | exit 1 | |
801 | ;; |
|
828 | ;; | |
802 |
|
829 | |||
803 | *) |
|
830 | *) | |
804 | # :command.parse_requirements_case |
|
831 | # :command.parse_requirements_case | |
805 | # :command.parse_requirements_case_simple |
|
832 | # :command.parse_requirements_case_simple | |
806 | printf "invalid argument: %s\n" "$key" >&2 |
|
833 | printf "invalid argument: %s\n" "$key" >&2 | |
807 | exit 1 |
|
834 | exit 1 | |
808 |
|
835 | |||
809 | ;; |
|
836 | ;; | |
810 |
|
837 | |||
811 | esac |
|
838 | esac | |
812 | done |
|
839 | done | |
813 |
|
840 | |||
814 | } |
|
841 | } | |
815 |
|
842 | |||
816 | # :command.parse_requirements |
|
843 | # :command.parse_requirements | |
817 | dev_tools_vcs_parse_requirements() { |
|
844 | dev_tools_vcs_parse_requirements() { | |
818 | # :command.fixed_flags_filter |
|
845 | # :command.fixed_flags_filter | |
819 | while [[ $# -gt 0 ]]; do |
|
846 | while [[ $# -gt 0 ]]; do | |
820 | case "${1:-}" in |
|
847 | case "${1:-}" in | |
821 | --help | -h) |
|
848 | --help | -h) | |
822 | long_usage=yes |
|
849 | long_usage=yes | |
823 | dev_tools_vcs_usage |
|
850 | dev_tools_vcs_usage | |
824 | exit |
|
851 | exit | |
825 | ;; |
|
852 | ;; | |
826 |
|
853 | |||
827 | *) |
|
854 | *) | |
828 | break |
|
855 | break | |
829 | ;; |
|
856 | ;; | |
830 |
|
857 | |||
831 | esac |
|
858 | esac | |
832 | done |
|
859 | done | |
833 |
|
860 | |||
834 | # :command.command_filter |
|
861 | # :command.command_filter | |
835 | action="vcs" |
|
862 | action="vcs" | |
836 |
|
863 | |||
837 | # :command.parse_requirements_while |
|
864 | # :command.parse_requirements_while | |
838 | while [[ $# -gt 0 ]]; do |
|
865 | while [[ $# -gt 0 ]]; do | |
839 | key="$1" |
|
866 | key="$1" | |
840 | case "$key" in |
|
867 | case "$key" in | |
841 |
|
868 | |||
842 | -?*) |
|
869 | -?*) | |
843 | printf "invalid option: %s\n" "$key" >&2 |
|
870 | printf "invalid option: %s\n" "$key" >&2 | |
844 | exit 1 |
|
871 | exit 1 | |
845 | ;; |
|
872 | ;; | |
846 |
|
873 | |||
847 | *) |
|
874 | *) | |
848 | # :command.parse_requirements_case |
|
875 | # :command.parse_requirements_case | |
849 | # :command.parse_requirements_case_simple |
|
876 | # :command.parse_requirements_case_simple | |
850 | printf "invalid argument: %s\n" "$key" >&2 |
|
877 | printf "invalid argument: %s\n" "$key" >&2 | |
851 | exit 1 |
|
878 | exit 1 | |
852 |
|
879 | |||
853 | ;; |
|
880 | ;; | |
854 |
|
881 | |||
855 | esac |
|
882 | esac | |
856 | done |
|
883 | done | |
857 |
|
884 | |||
858 | } |
|
885 | } | |
859 |
|
886 | |||
860 | # :command.parse_requirements |
|
887 | # :command.parse_requirements | |
861 | dev_tools_ee_parse_requirements() { |
|
888 | dev_tools_ee_parse_requirements() { | |
862 | # :command.fixed_flags_filter |
|
889 | # :command.fixed_flags_filter | |
863 | while [[ $# -gt 0 ]]; do |
|
890 | while [[ $# -gt 0 ]]; do | |
864 | case "${1:-}" in |
|
891 | case "${1:-}" in | |
865 | --help | -h) |
|
892 | --help | -h) | |
866 | long_usage=yes |
|
893 | long_usage=yes | |
867 | dev_tools_ee_usage |
|
894 | dev_tools_ee_usage | |
868 | exit |
|
895 | exit | |
869 | ;; |
|
896 | ;; | |
870 |
|
897 | |||
871 | *) |
|
898 | *) | |
872 | break |
|
899 | break | |
873 | ;; |
|
900 | ;; | |
874 |
|
901 | |||
875 | esac |
|
902 | esac | |
876 | done |
|
903 | done | |
877 |
|
904 | |||
878 | # :command.command_filter |
|
905 | # :command.command_filter | |
879 | action="ee" |
|
906 | action="ee" | |
880 |
|
907 | |||
881 | # :command.parse_requirements_while |
|
908 | # :command.parse_requirements_while | |
882 | while [[ $# -gt 0 ]]; do |
|
909 | while [[ $# -gt 0 ]]; do | |
883 | key="$1" |
|
910 | key="$1" | |
884 | case "$key" in |
|
911 | case "$key" in | |
885 |
|
912 | |||
886 | -?*) |
|
913 | -?*) | |
887 | printf "invalid option: %s\n" "$key" >&2 |
|
914 | printf "invalid option: %s\n" "$key" >&2 | |
888 | exit 1 |
|
915 | exit 1 | |
889 | ;; |
|
916 | ;; | |
890 |
|
917 | |||
891 | *) |
|
918 | *) | |
892 | # :command.parse_requirements_case |
|
919 | # :command.parse_requirements_case | |
893 | # :command.parse_requirements_case_simple |
|
920 | # :command.parse_requirements_case_simple | |
894 | printf "invalid argument: %s\n" "$key" >&2 |
|
921 | printf "invalid argument: %s\n" "$key" >&2 | |
895 | exit 1 |
|
922 | exit 1 | |
896 |
|
923 | |||
897 | ;; |
|
924 | ;; | |
898 |
|
925 | |||
899 | esac |
|
926 | esac | |
900 | done |
|
927 | done | |
901 |
|
928 | |||
902 | } |
|
929 | } | |
903 |
|
930 | |||
904 | # :command.parse_requirements |
|
931 | # :command.parse_requirements | |
905 | dev_tools_ce_parse_requirements() { |
|
932 | dev_tools_ce_parse_requirements() { | |
906 | # :command.fixed_flags_filter |
|
933 | # :command.fixed_flags_filter | |
907 | while [[ $# -gt 0 ]]; do |
|
934 | while [[ $# -gt 0 ]]; do | |
908 | case "${1:-}" in |
|
935 | case "${1:-}" in | |
909 | --help | -h) |
|
936 | --help | -h) | |
910 | long_usage=yes |
|
937 | long_usage=yes | |
911 | dev_tools_ce_usage |
|
938 | dev_tools_ce_usage | |
912 | exit |
|
939 | exit | |
913 | ;; |
|
940 | ;; | |
914 |
|
941 | |||
915 | *) |
|
942 | *) | |
916 | break |
|
943 | break | |
917 | ;; |
|
944 | ;; | |
918 |
|
945 | |||
919 | esac |
|
946 | esac | |
920 | done |
|
947 | done | |
921 |
|
948 | |||
922 | # :command.command_filter |
|
949 | # :command.command_filter | |
923 | action="ce" |
|
950 | action="ce" | |
924 |
|
951 | |||
925 | # :command.parse_requirements_while |
|
952 | # :command.parse_requirements_while | |
926 | while [[ $# -gt 0 ]]; do |
|
953 | while [[ $# -gt 0 ]]; do | |
927 | key="$1" |
|
954 | key="$1" | |
928 | case "$key" in |
|
955 | case "$key" in | |
929 |
|
956 | |||
930 | -?*) |
|
957 | -?*) | |
931 | printf "invalid option: %s\n" "$key" >&2 |
|
958 | printf "invalid option: %s\n" "$key" >&2 | |
932 | exit 1 |
|
959 | exit 1 | |
933 | ;; |
|
960 | ;; | |
934 |
|
961 | |||
935 | *) |
|
962 | *) | |
936 | # :command.parse_requirements_case |
|
963 | # :command.parse_requirements_case | |
937 | # :command.parse_requirements_case_simple |
|
964 | # :command.parse_requirements_case_simple | |
938 | printf "invalid argument: %s\n" "$key" >&2 |
|
965 | printf "invalid argument: %s\n" "$key" >&2 | |
939 | exit 1 |
|
966 | exit 1 | |
940 |
|
967 | |||
941 | ;; |
|
968 | ;; | |
942 |
|
969 | |||
943 | esac |
|
970 | esac | |
944 | done |
|
971 | done | |
945 |
|
972 | |||
946 | } |
|
973 | } | |
947 |
|
974 | |||
948 | # :command.parse_requirements |
|
975 | # :command.parse_requirements | |
949 | dev_tools_tools_parse_requirements() { |
|
976 | dev_tools_tools_parse_requirements() { | |
950 | # :command.fixed_flags_filter |
|
977 | # :command.fixed_flags_filter | |
951 | while [[ $# -gt 0 ]]; do |
|
978 | while [[ $# -gt 0 ]]; do | |
952 | case "${1:-}" in |
|
979 | case "${1:-}" in | |
953 | --help | -h) |
|
980 | --help | -h) | |
954 | long_usage=yes |
|
981 | long_usage=yes | |
955 | dev_tools_tools_usage |
|
982 | dev_tools_tools_usage | |
956 | exit |
|
983 | exit | |
957 | ;; |
|
984 | ;; | |
958 |
|
985 | |||
959 | *) |
|
986 | *) | |
960 | break |
|
987 | break | |
961 | ;; |
|
988 | ;; | |
962 |
|
989 | |||
963 | esac |
|
990 | esac | |
964 | done |
|
991 | done | |
965 |
|
992 | |||
966 | # :command.command_filter |
|
993 | # :command.command_filter | |
967 | action="tools" |
|
994 | action="tools" | |
968 |
|
995 | |||
969 | # :command.parse_requirements_while |
|
996 | # :command.parse_requirements_while | |
970 | while [[ $# -gt 0 ]]; do |
|
997 | while [[ $# -gt 0 ]]; do | |
971 | key="$1" |
|
998 | key="$1" | |
972 | case "$key" in |
|
999 | case "$key" in | |
973 |
|
1000 | |||
974 | -?*) |
|
1001 | -?*) | |
975 | printf "invalid option: %s\n" "$key" >&2 |
|
1002 | printf "invalid option: %s\n" "$key" >&2 | |
976 | exit 1 |
|
1003 | exit 1 | |
977 | ;; |
|
1004 | ;; | |
978 |
|
1005 | |||
979 | *) |
|
1006 | *) | |
980 | # :command.parse_requirements_case |
|
1007 | # :command.parse_requirements_case | |
981 | # :command.parse_requirements_case_simple |
|
1008 | # :command.parse_requirements_case_simple | |
982 | printf "invalid argument: %s\n" "$key" >&2 |
|
1009 | printf "invalid argument: %s\n" "$key" >&2 | |
983 | exit 1 |
|
1010 | exit 1 | |
984 |
|
1011 | |||
985 | ;; |
|
1012 | ;; | |
986 |
|
1013 | |||
987 | esac |
|
1014 | esac | |
988 | done |
|
1015 | done | |
989 |
|
1016 | |||
990 | } |
|
1017 | } | |
991 |
|
1018 | |||
992 | # :command.parse_requirements |
|
1019 | # :command.parse_requirements | |
993 | dev_tools_celery_parse_requirements() { |
|
1020 | dev_tools_celery_parse_requirements() { | |
994 | # :command.fixed_flags_filter |
|
1021 | # :command.fixed_flags_filter | |
995 | while [[ $# -gt 0 ]]; do |
|
1022 | while [[ $# -gt 0 ]]; do | |
996 | case "${1:-}" in |
|
1023 | case "${1:-}" in | |
997 | --help | -h) |
|
1024 | --help | -h) | |
998 | long_usage=yes |
|
1025 | long_usage=yes | |
999 | dev_tools_celery_usage |
|
1026 | dev_tools_celery_usage | |
1000 | exit |
|
1027 | exit | |
1001 | ;; |
|
1028 | ;; | |
1002 |
|
1029 | |||
1003 | *) |
|
1030 | *) | |
1004 | break |
|
1031 | break | |
1005 | ;; |
|
1032 | ;; | |
1006 |
|
1033 | |||
1007 | esac |
|
1034 | esac | |
1008 | done |
|
1035 | done | |
1009 |
|
1036 | |||
1010 | # :command.command_filter |
|
1037 | # :command.command_filter | |
1011 | action="celery" |
|
1038 | action="celery" | |
1012 |
|
1039 | |||
1013 | # :command.parse_requirements_while |
|
1040 | # :command.parse_requirements_while | |
1014 | while [[ $# -gt 0 ]]; do |
|
1041 | while [[ $# -gt 0 ]]; do | |
1015 | key="$1" |
|
1042 | key="$1" | |
1016 | case "$key" in |
|
1043 | case "$key" in | |
1017 |
|
1044 | |||
1018 | -?*) |
|
1045 | -?*) | |
1019 | printf "invalid option: %s\n" "$key" >&2 |
|
1046 | printf "invalid option: %s\n" "$key" >&2 | |
1020 | exit 1 |
|
1047 | exit 1 | |
1021 | ;; |
|
1048 | ;; | |
1022 |
|
1049 | |||
1023 | *) |
|
1050 | *) | |
1024 | # :command.parse_requirements_case |
|
1051 | # :command.parse_requirements_case | |
1025 | # :command.parse_requirements_case_simple |
|
1052 | # :command.parse_requirements_case_simple | |
1026 | printf "invalid argument: %s\n" "$key" >&2 |
|
1053 | printf "invalid argument: %s\n" "$key" >&2 | |
1027 | exit 1 |
|
1054 | exit 1 | |
1028 |
|
1055 | |||
1029 | ;; |
|
1056 | ;; | |
1030 |
|
1057 | |||
1031 | esac |
|
1058 | esac | |
1032 | done |
|
1059 | done | |
1033 |
|
1060 | |||
1034 | } |
|
1061 | } | |
1035 |
|
1062 | |||
1036 | # :command.parse_requirements |
|
1063 | # :command.parse_requirements | |
1037 | dev_tools_dev_env_parse_requirements() { |
|
1064 | dev_tools_dev_env_parse_requirements() { | |
1038 | # :command.fixed_flags_filter |
|
1065 | # :command.fixed_flags_filter | |
1039 | while [[ $# -gt 0 ]]; do |
|
1066 | while [[ $# -gt 0 ]]; do | |
1040 | case "${1:-}" in |
|
1067 | case "${1:-}" in | |
1041 | --help | -h) |
|
1068 | --help | -h) | |
1042 | long_usage=yes |
|
1069 | long_usage=yes | |
1043 | dev_tools_dev_env_usage |
|
1070 | dev_tools_dev_env_usage | |
1044 | exit |
|
1071 | exit | |
1045 | ;; |
|
1072 | ;; | |
1046 |
|
1073 | |||
1047 | *) |
|
1074 | *) | |
1048 | break |
|
1075 | break | |
1049 | ;; |
|
1076 | ;; | |
1050 |
|
1077 | |||
1051 | esac |
|
1078 | esac | |
1052 | done |
|
1079 | done | |
1053 |
|
1080 | |||
1054 | # :command.command_filter |
|
1081 | # :command.command_filter | |
1055 | action="dev-env" |
|
1082 | action="dev-env" | |
1056 |
|
1083 | |||
1057 | # :command.parse_requirements_while |
|
1084 | # :command.parse_requirements_while | |
1058 | while [[ $# -gt 0 ]]; do |
|
1085 | while [[ $# -gt 0 ]]; do | |
1059 | key="$1" |
|
1086 | key="$1" | |
1060 | case "$key" in |
|
1087 | case "$key" in | |
1061 |
|
1088 | |||
1062 | -?*) |
|
1089 | -?*) | |
1063 | printf "invalid option: %s\n" "$key" >&2 |
|
1090 | printf "invalid option: %s\n" "$key" >&2 | |
1064 | exit 1 |
|
1091 | exit 1 | |
1065 | ;; |
|
1092 | ;; | |
1066 |
|
1093 | |||
1067 | *) |
|
1094 | *) | |
1068 | # :command.parse_requirements_case |
|
1095 | # :command.parse_requirements_case | |
1069 | # :command.parse_requirements_case_simple |
|
1096 | # :command.parse_requirements_case_simple | |
1070 | printf "invalid argument: %s\n" "$key" >&2 |
|
1097 | printf "invalid argument: %s\n" "$key" >&2 | |
1071 | exit 1 |
|
1098 | exit 1 | |
1072 |
|
1099 | |||
1073 | ;; |
|
1100 | ;; | |
1074 |
|
1101 | |||
1075 | esac |
|
1102 | esac | |
1076 | done |
|
1103 | done | |
1077 |
|
1104 | |||
1078 | } |
|
1105 | } | |
1079 |
|
1106 | |||
1080 | # :command.parse_requirements |
|
1107 | # :command.parse_requirements | |
1081 | dev_tools_prune_parse_requirements() { |
|
1108 | dev_tools_prune_parse_requirements() { | |
1082 | # :command.fixed_flags_filter |
|
1109 | # :command.fixed_flags_filter | |
1083 | while [[ $# -gt 0 ]]; do |
|
1110 | while [[ $# -gt 0 ]]; do | |
1084 | case "${1:-}" in |
|
1111 | case "${1:-}" in | |
1085 | --help | -h) |
|
1112 | --help | -h) | |
1086 | long_usage=yes |
|
1113 | long_usage=yes | |
1087 | dev_tools_prune_usage |
|
1114 | dev_tools_prune_usage | |
1088 | exit |
|
1115 | exit | |
1089 | ;; |
|
1116 | ;; | |
1090 |
|
1117 | |||
1091 | *) |
|
1118 | *) | |
1092 | break |
|
1119 | break | |
1093 | ;; |
|
1120 | ;; | |
1094 |
|
1121 | |||
1095 | esac |
|
1122 | esac | |
1096 | done |
|
1123 | done | |
1097 |
|
1124 | |||
1098 | # :command.command_filter |
|
1125 | # :command.command_filter | |
1099 | action="prune" |
|
1126 | action="prune" | |
1100 |
|
1127 | |||
1101 | # :command.parse_requirements_while |
|
1128 | # :command.parse_requirements_while | |
1102 | while [[ $# -gt 0 ]]; do |
|
1129 | while [[ $# -gt 0 ]]; do | |
1103 | key="$1" |
|
1130 | key="$1" | |
1104 | case "$key" in |
|
1131 | case "$key" in | |
1105 |
|
1132 | |||
1106 | -?*) |
|
1133 | -?*) | |
1107 | printf "invalid option: %s\n" "$key" >&2 |
|
1134 | printf "invalid option: %s\n" "$key" >&2 | |
1108 | exit 1 |
|
1135 | exit 1 | |
1109 | ;; |
|
1136 | ;; | |
1110 |
|
1137 | |||
1111 | *) |
|
1138 | *) | |
1112 | # :command.parse_requirements_case |
|
1139 | # :command.parse_requirements_case | |
1113 | # :command.parse_requirements_case_simple |
|
1140 | # :command.parse_requirements_case_simple | |
1114 | printf "invalid argument: %s\n" "$key" >&2 |
|
1141 | printf "invalid argument: %s\n" "$key" >&2 | |
1115 | exit 1 |
|
1142 | exit 1 | |
1116 |
|
1143 | |||
1117 | ;; |
|
1144 | ;; | |
1118 |
|
1145 | |||
1119 | esac |
|
1146 | esac | |
1120 | done |
|
1147 | done | |
1121 |
|
1148 | |||
1122 | } |
|
1149 | } | |
1123 |
|
1150 | |||
1124 | # :command.parse_requirements |
|
1151 | # :command.parse_requirements | |
1125 | dev_tools_prune_all_parse_requirements() { |
|
1152 | dev_tools_prune_all_parse_requirements() { | |
1126 | # :command.fixed_flags_filter |
|
1153 | # :command.fixed_flags_filter | |
1127 | while [[ $# -gt 0 ]]; do |
|
1154 | while [[ $# -gt 0 ]]; do | |
1128 | case "${1:-}" in |
|
1155 | case "${1:-}" in | |
1129 | --help | -h) |
|
1156 | --help | -h) | |
1130 | long_usage=yes |
|
1157 | long_usage=yes | |
1131 | dev_tools_prune_all_usage |
|
1158 | dev_tools_prune_all_usage | |
1132 | exit |
|
1159 | exit | |
1133 | ;; |
|
1160 | ;; | |
1134 |
|
1161 | |||
1135 | *) |
|
1162 | *) | |
1136 | break |
|
1163 | break | |
1137 | ;; |
|
1164 | ;; | |
1138 |
|
1165 | |||
1139 | esac |
|
1166 | esac | |
1140 | done |
|
1167 | done | |
1141 |
|
1168 | |||
1142 | # :command.command_filter |
|
1169 | # :command.command_filter | |
1143 | action="prune-all" |
|
1170 | action="prune-all" | |
1144 |
|
1171 | |||
1145 | # :command.parse_requirements_while |
|
1172 | # :command.parse_requirements_while | |
1146 | while [[ $# -gt 0 ]]; do |
|
1173 | while [[ $# -gt 0 ]]; do | |
1147 | key="$1" |
|
1174 | key="$1" | |
1148 | case "$key" in |
|
1175 | case "$key" in | |
1149 |
|
1176 | |||
1150 | -?*) |
|
1177 | -?*) | |
1151 | printf "invalid option: %s\n" "$key" >&2 |
|
1178 | printf "invalid option: %s\n" "$key" >&2 | |
1152 | exit 1 |
|
1179 | exit 1 | |
1153 | ;; |
|
1180 | ;; | |
1154 |
|
1181 | |||
1155 | *) |
|
1182 | *) | |
1156 | # :command.parse_requirements_case |
|
1183 | # :command.parse_requirements_case | |
1157 | # :command.parse_requirements_case_simple |
|
1184 | # :command.parse_requirements_case_simple | |
1158 | printf "invalid argument: %s\n" "$key" >&2 |
|
1185 | printf "invalid argument: %s\n" "$key" >&2 | |
1159 | exit 1 |
|
1186 | exit 1 | |
1160 |
|
1187 | |||
1161 | ;; |
|
1188 | ;; | |
1162 |
|
1189 | |||
1163 | esac |
|
1190 | esac | |
1164 | done |
|
1191 | done | |
1165 |
|
1192 | |||
1166 | } |
|
1193 | } | |
1167 |
|
1194 | |||
1168 | # :command.parse_requirements |
|
1195 | # :command.parse_requirements | |
1169 | dev_tools_cli_generate_pull_parse_requirements() { |
|
1196 | dev_tools_cli_generate_pull_parse_requirements() { | |
1170 | # :command.fixed_flags_filter |
|
1197 | # :command.fixed_flags_filter | |
1171 | while [[ $# -gt 0 ]]; do |
|
1198 | while [[ $# -gt 0 ]]; do | |
1172 | case "${1:-}" in |
|
1199 | case "${1:-}" in | |
1173 | --help | -h) |
|
1200 | --help | -h) | |
1174 | long_usage=yes |
|
1201 | long_usage=yes | |
1175 | dev_tools_cli_generate_pull_usage |
|
1202 | dev_tools_cli_generate_pull_usage | |
1176 | exit |
|
1203 | exit | |
1177 | ;; |
|
1204 | ;; | |
1178 |
|
1205 | |||
1179 | *) |
|
1206 | *) | |
1180 | break |
|
1207 | break | |
1181 | ;; |
|
1208 | ;; | |
1182 |
|
1209 | |||
1183 | esac |
|
1210 | esac | |
1184 | done |
|
1211 | done | |
1185 |
|
1212 | |||
1186 | # :command.command_filter |
|
1213 | # :command.command_filter | |
1187 | action="cli-generate-pull" |
|
1214 | action="cli-generate-pull" | |
1188 |
|
1215 | |||
1189 | # :command.parse_requirements_while |
|
1216 | # :command.parse_requirements_while | |
1190 | while [[ $# -gt 0 ]]; do |
|
1217 | while [[ $# -gt 0 ]]; do | |
1191 | key="$1" |
|
1218 | key="$1" | |
1192 | case "$key" in |
|
1219 | case "$key" in | |
1193 |
|
1220 | |||
1194 | -?*) |
|
1221 | -?*) | |
1195 | printf "invalid option: %s\n" "$key" >&2 |
|
1222 | printf "invalid option: %s\n" "$key" >&2 | |
1196 | exit 1 |
|
1223 | exit 1 | |
1197 | ;; |
|
1224 | ;; | |
1198 |
|
1225 | |||
1199 | *) |
|
1226 | *) | |
1200 | # :command.parse_requirements_case |
|
1227 | # :command.parse_requirements_case | |
1201 | # :command.parse_requirements_case_simple |
|
1228 | # :command.parse_requirements_case_simple | |
1202 | printf "invalid argument: %s\n" "$key" >&2 |
|
1229 | printf "invalid argument: %s\n" "$key" >&2 | |
1203 | exit 1 |
|
1230 | exit 1 | |
1204 |
|
1231 | |||
1205 | ;; |
|
1232 | ;; | |
1206 |
|
1233 | |||
1207 | esac |
|
1234 | esac | |
1208 | done |
|
1235 | done | |
1209 |
|
1236 | |||
1210 | } |
|
1237 | } | |
1211 |
|
1238 | |||
1212 | # :command.parse_requirements |
|
1239 | # :command.parse_requirements | |
1213 | dev_tools_cli_generate_help_parse_requirements() { |
|
1240 | dev_tools_cli_generate_help_parse_requirements() { | |
1214 | # :command.fixed_flags_filter |
|
1241 | # :command.fixed_flags_filter | |
1215 | while [[ $# -gt 0 ]]; do |
|
1242 | while [[ $# -gt 0 ]]; do | |
1216 | case "${1:-}" in |
|
1243 | case "${1:-}" in | |
1217 | --help | -h) |
|
1244 | --help | -h) | |
1218 | long_usage=yes |
|
1245 | long_usage=yes | |
1219 | dev_tools_cli_generate_help_usage |
|
1246 | dev_tools_cli_generate_help_usage | |
1220 | exit |
|
1247 | exit | |
1221 | ;; |
|
1248 | ;; | |
1222 |
|
1249 | |||
1223 | *) |
|
1250 | *) | |
1224 | break |
|
1251 | break | |
1225 | ;; |
|
1252 | ;; | |
1226 |
|
1253 | |||
1227 | esac |
|
1254 | esac | |
1228 | done |
|
1255 | done | |
1229 |
|
1256 | |||
1230 | # :command.command_filter |
|
1257 | # :command.command_filter | |
1231 | action="cli-generate-help" |
|
1258 | action="cli-generate-help" | |
1232 |
|
1259 | |||
1233 | # :command.parse_requirements_while |
|
1260 | # :command.parse_requirements_while | |
1234 | while [[ $# -gt 0 ]]; do |
|
1261 | while [[ $# -gt 0 ]]; do | |
1235 | key="$1" |
|
1262 | key="$1" | |
1236 | case "$key" in |
|
1263 | case "$key" in | |
1237 |
|
1264 | |||
1238 | -?*) |
|
1265 | -?*) | |
1239 | printf "invalid option: %s\n" "$key" >&2 |
|
1266 | printf "invalid option: %s\n" "$key" >&2 | |
1240 | exit 1 |
|
1267 | exit 1 | |
1241 | ;; |
|
1268 | ;; | |
1242 |
|
1269 | |||
1243 | *) |
|
1270 | *) | |
1244 | # :command.parse_requirements_case |
|
1271 | # :command.parse_requirements_case | |
1245 | # :command.parse_requirements_case_simple |
|
1272 | # :command.parse_requirements_case_simple | |
1246 | printf "invalid argument: %s\n" "$key" >&2 |
|
1273 | printf "invalid argument: %s\n" "$key" >&2 | |
1247 | exit 1 |
|
1274 | exit 1 | |
1248 |
|
1275 | |||
1249 | ;; |
|
1276 | ;; | |
1250 |
|
1277 | |||
1251 | esac |
|
1278 | esac | |
1252 | done |
|
1279 | done | |
1253 |
|
1280 | |||
1254 | } |
|
1281 | } | |
1255 |
|
1282 | |||
1256 | # :command.parse_requirements |
|
1283 | # :command.parse_requirements | |
1257 | dev_tools_stack_cli_generate_parse_requirements() { |
|
1284 | dev_tools_stack_cli_generate_parse_requirements() { | |
1258 | # :command.fixed_flags_filter |
|
1285 | # :command.fixed_flags_filter | |
1259 | while [[ $# -gt 0 ]]; do |
|
1286 | while [[ $# -gt 0 ]]; do | |
1260 | case "${1:-}" in |
|
1287 | case "${1:-}" in | |
1261 | --help | -h) |
|
1288 | --help | -h) | |
1262 | long_usage=yes |
|
1289 | long_usage=yes | |
1263 | dev_tools_stack_cli_generate_usage |
|
1290 | dev_tools_stack_cli_generate_usage | |
1264 | exit |
|
1291 | exit | |
1265 | ;; |
|
1292 | ;; | |
1266 |
|
1293 | |||
1267 | *) |
|
1294 | *) | |
1268 | break |
|
1295 | break | |
1269 | ;; |
|
1296 | ;; | |
1270 |
|
1297 | |||
1271 | esac |
|
1298 | esac | |
1272 | done |
|
1299 | done | |
1273 |
|
1300 | |||
1274 | # :command.command_filter |
|
1301 | # :command.command_filter | |
1275 | action="stack-cli-generate" |
|
1302 | action="stack-cli-generate" | |
1276 |
|
1303 | |||
1277 | # :command.parse_requirements_while |
|
1304 | # :command.parse_requirements_while | |
1278 | while [[ $# -gt 0 ]]; do |
|
1305 | while [[ $# -gt 0 ]]; do | |
1279 | key="$1" |
|
1306 | key="$1" | |
1280 | case "$key" in |
|
1307 | case "$key" in | |
1281 | # :flag.case |
|
1308 | # :flag.case | |
1282 | --one-time | -o) |
|
1309 | --one-time | -o) | |
1283 |
|
1310 | |||
1284 | # :flag.case_no_arg |
|
1311 | # :flag.case_no_arg | |
1285 | args['--one-time']=1 |
|
1312 | args['--one-time']=1 | |
1286 | shift |
|
1313 | shift | |
1287 | ;; |
|
1314 | ;; | |
1288 |
|
1315 | |||
1289 | -?*) |
|
1316 | -?*) | |
1290 | printf "invalid option: %s\n" "$key" >&2 |
|
1317 | printf "invalid option: %s\n" "$key" >&2 | |
1291 | exit 1 |
|
1318 | exit 1 | |
1292 | ;; |
|
1319 | ;; | |
1293 |
|
1320 | |||
1294 | *) |
|
1321 | *) | |
1295 | # :command.parse_requirements_case |
|
1322 | # :command.parse_requirements_case | |
1296 | # :command.parse_requirements_case_simple |
|
1323 | # :command.parse_requirements_case_simple | |
1297 | printf "invalid argument: %s\n" "$key" >&2 |
|
1324 | printf "invalid argument: %s\n" "$key" >&2 | |
1298 | exit 1 |
|
1325 | exit 1 | |
1299 |
|
1326 | |||
1300 | ;; |
|
1327 | ;; | |
1301 |
|
1328 | |||
1302 | esac |
|
1329 | esac | |
1303 | done |
|
1330 | done | |
1304 |
|
1331 | |||
1305 | } |
|
1332 | } | |
1306 |
|
1333 | |||
1307 | # :command.parse_requirements |
|
1334 | # :command.parse_requirements | |
1308 | dev_tools_dev_cli_generate_parse_requirements() { |
|
1335 | dev_tools_dev_cli_generate_parse_requirements() { | |
1309 | # :command.fixed_flags_filter |
|
1336 | # :command.fixed_flags_filter | |
1310 | while [[ $# -gt 0 ]]; do |
|
1337 | while [[ $# -gt 0 ]]; do | |
1311 | case "${1:-}" in |
|
1338 | case "${1:-}" in | |
1312 | --help | -h) |
|
1339 | --help | -h) | |
1313 | long_usage=yes |
|
1340 | long_usage=yes | |
1314 | dev_tools_dev_cli_generate_usage |
|
1341 | dev_tools_dev_cli_generate_usage | |
1315 | exit |
|
1342 | exit | |
1316 | ;; |
|
1343 | ;; | |
1317 |
|
1344 | |||
1318 | *) |
|
1345 | *) | |
1319 | break |
|
1346 | break | |
1320 | ;; |
|
1347 | ;; | |
1321 |
|
1348 | |||
1322 | esac |
|
1349 | esac | |
1323 | done |
|
1350 | done | |
1324 |
|
1351 | |||
1325 | # :command.command_filter |
|
1352 | # :command.command_filter | |
1326 | action="dev-cli-generate" |
|
1353 | action="dev-cli-generate" | |
1327 |
|
1354 | |||
1328 | # :command.parse_requirements_while |
|
1355 | # :command.parse_requirements_while | |
1329 | while [[ $# -gt 0 ]]; do |
|
1356 | while [[ $# -gt 0 ]]; do | |
1330 | key="$1" |
|
1357 | key="$1" | |
1331 | case "$key" in |
|
1358 | case "$key" in | |
1332 | # :flag.case |
|
1359 | # :flag.case | |
1333 | --one-time | -o) |
|
1360 | --one-time | -o) | |
1334 |
|
1361 | |||
1335 | # :flag.case_no_arg |
|
1362 | # :flag.case_no_arg | |
1336 | args['--one-time']=1 |
|
1363 | args['--one-time']=1 | |
1337 | shift |
|
1364 | shift | |
1338 | ;; |
|
1365 | ;; | |
1339 |
|
1366 | |||
1340 | -?*) |
|
1367 | -?*) | |
1341 | printf "invalid option: %s\n" "$key" >&2 |
|
1368 | printf "invalid option: %s\n" "$key" >&2 | |
1342 | exit 1 |
|
1369 | exit 1 | |
1343 | ;; |
|
1370 | ;; | |
1344 |
|
1371 | |||
1345 | *) |
|
1372 | *) | |
1346 | # :command.parse_requirements_case |
|
1373 | # :command.parse_requirements_case | |
1347 | # :command.parse_requirements_case_simple |
|
1374 | # :command.parse_requirements_case_simple | |
1348 | printf "invalid argument: %s\n" "$key" >&2 |
|
1375 | printf "invalid argument: %s\n" "$key" >&2 | |
1349 | exit 1 |
|
1376 | exit 1 | |
1350 |
|
1377 | |||
1351 | ;; |
|
1378 | ;; | |
1352 |
|
1379 | |||
1353 | esac |
|
1380 | esac | |
1354 | done |
|
1381 | done | |
1355 |
|
1382 | |||
1356 | } |
|
1383 | } | |
1357 |
|
1384 | |||
1358 | # :command.initialize |
|
1385 | # :command.initialize | |
1359 | initialize() { |
|
1386 | initialize() { | |
1360 | version="0.0.2" |
|
1387 | version="0.0.2" | |
1361 | long_usage='' |
|
1388 | long_usage='' | |
1362 | set -e |
|
1389 | set -e | |
1363 |
|
1390 | |||
1364 | # src/initialize.sh |
|
1391 | # src/initialize.sh | |
1365 |
|
1392 | |||
1366 | bashly_image="dannyben/bashly:1.0.8" |
|
1393 | bashly_image="dannyben/bashly:1.0.8" | |
1367 | } |
|
1394 | } | |
1368 |
|
1395 | |||
1369 | # :command.run |
|
1396 | # :command.run | |
1370 | run() { |
|
1397 | run() { | |
1371 | declare -A args=() |
|
1398 | declare -A args=() | |
1372 | declare -A deps=() |
|
1399 | declare -A deps=() | |
1373 | declare -a other_args=() |
|
1400 | declare -a other_args=() | |
1374 | declare -a input=() |
|
1401 | declare -a input=() | |
1375 | normalize_input "$@" |
|
1402 | normalize_input "$@" | |
1376 | parse_requirements "${input[@]}" |
|
1403 | parse_requirements "${input[@]}" | |
1377 |
|
1404 | |||
1378 | case "$action" in |
|
1405 | case "$action" in | |
1379 | "vcs") dev_tools_vcs_command ;; |
|
1406 | "vcs") dev_tools_vcs_command ;; | |
1380 | "ee") dev_tools_ee_command ;; |
|
1407 | "ee") dev_tools_ee_command ;; | |
1381 | "ce") dev_tools_ce_command ;; |
|
1408 | "ce") dev_tools_ce_command ;; | |
1382 | "tools") dev_tools_tools_command ;; |
|
1409 | "tools") dev_tools_tools_command ;; | |
1383 | "celery") dev_tools_celery_command ;; |
|
1410 | "celery") dev_tools_celery_command ;; | |
1384 | "dev-env") dev_tools_dev_env_command ;; |
|
1411 | "dev-env") dev_tools_dev_env_command ;; | |
1385 | "prune") dev_tools_prune_command ;; |
|
1412 | "prune") dev_tools_prune_command ;; | |
1386 | "prune-all") dev_tools_prune_all_command ;; |
|
1413 | "prune-all") dev_tools_prune_all_command ;; | |
1387 | "cli-generate-pull") dev_tools_cli_generate_pull_command ;; |
|
1414 | "cli-generate-pull") dev_tools_cli_generate_pull_command ;; | |
1388 | "cli-generate-help") dev_tools_cli_generate_help_command ;; |
|
1415 | "cli-generate-help") dev_tools_cli_generate_help_command ;; | |
1389 | "stack-cli-generate") dev_tools_stack_cli_generate_command ;; |
|
1416 | "stack-cli-generate") dev_tools_stack_cli_generate_command ;; | |
1390 | "dev-cli-generate") dev_tools_dev_cli_generate_command ;; |
|
1417 | "dev-cli-generate") dev_tools_dev_cli_generate_command ;; | |
1391 | esac |
|
1418 | esac | |
1392 | } |
|
1419 | } | |
1393 |
|
1420 | |||
1394 | initialize |
|
1421 | initialize | |
1395 | run "$@" |
|
1422 | run "$@" |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now