File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ POSITIONAL_ARGS=()
4
+ VERBOSE=" false"
5
+
6
+ while [[ $# -gt 0 ]]; do
7
+ case $1 in
8
+ -v|--verbose)
9
+ VERBOSE=" true"
10
+ shift # past argument
11
+ ;;
12
+ -* |--* )
13
+ echo " Unknown option $1 "
14
+ exit 1
15
+ ;;
16
+ * )
17
+ POSITIONAL_ARGS+=(" $1 " ) # save positional arg
18
+ shift # past argument
19
+ ;;
20
+ esac
21
+ done
22
+
23
+ set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
24
+
3
25
# default samples file path
4
26
samples_file=$( pwd) /extraDevfileEntries.yaml
5
27
# Cached remote samples directory
@@ -205,10 +227,20 @@ get_children_of_parents() {
205
227
206
228
if [ ! -d ${base_path} /registry-support ]
207
229
then
208
- git clone https://github.com/devfile/registry-support ${base_path} /registry-support
230
+ if [ " $VERBOSE " == " true" ]
231
+ then
232
+ git clone https://github.com/devfile/registry-support ${base_path} /registry-support
233
+ else
234
+ git clone -q https://github.com/devfile/registry-support ${base_path} /registry-support
235
+ fi
209
236
fi
210
237
211
- bash ${base_path} /registry-support/build-tools/cache_samples.sh ${samples_file} ${samples_dir}
238
+ if [ " $VERBOSE " == " true" ]
239
+ then
240
+ bash ${base_path} /registry-support/build-tools/cache_samples.sh ${samples_file} ${samples_dir}
241
+ else
242
+ bash ${base_path} /registry-support/build-tools/cache_samples.sh ${samples_file} ${samples_dir} > /dev/null 2>& - echo
243
+ fi
212
244
213
245
if [ -f ${parents_file} ]; then
214
246
rm ${parents_file}
You can’t perform that action at this time.
0 commit comments