From f1f1ba5dac1b531c346758072c798ceb511100b3 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 20 Nov 2017 16:38:28 -0800 Subject: Refactor clone and compile functions The clone_all_* and compile_all_* functions share same instructions for performing their functionality. This change pretends to reduce the duplication of the code. Change-Id: Ief63a5a58c79af85c829602b0451637424659438 Signed-off-by: Victor Morales Issue-Id: INT-339 --- bootstrap/vagrant-onap/lib/sdc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/sdc') diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc index 88d1cc0fd..f99e8b204 100755 --- a/bootstrap/vagrant-onap/lib/sdc +++ b/bootstrap/vagrant-onap/lib/sdc @@ -45,20 +45,6 @@ alias health='/data/scripts/docker_health.sh' EOL } -# clone_all_sdc_repos() - Function that clones SDC source repo. -function clone_all_sdc_repos { - for repo in ${sdc_repos[@]}; do - clone_repo $repo $sdc_src_folder${repo#*sdc} - done -} - -# compile_all_sdc_repos() - Function that compiles SDC source repo. -function compile_all_sdc_repos { - for repo in ${sdc_repos[@]}; do - compile_src $sdc_src_folder${repo#*sdc} - done -} - # get_sdc_images() - Function that retrieves the SDC docker images function get_sdc_images { if [[ "$build_image" == "True" ]]; then @@ -103,9 +89,9 @@ function install_sdc { function init_sdc { _mount_external_partition if [[ "$clone_repo" == "True" ]]; then - clone_all_sdc_repos + clone_repos "sdc" if [[ "$compile_repo" == "True" ]]; then - compile_all_sdc_repos + compile_repos "sdc" fi fi -- cgit 1.2.3-korg