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 11#! /bin/bash
22
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+
325# default samples file path
426samples_file=$( pwd) /extraDevfileEntries.yaml
527# Cached remote samples directory
@@ -205,10 +227,20 @@ get_children_of_parents() {
205227
206228if [ ! -d ${base_path} /registry-support ]
207229then
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
209236fi
210237
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
212244
213245if [ -f ${parents_file} ]; then
214246 rm ${parents_file}
You can’t perform that action at this time.
0 commit comments