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/appc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/appc') diff --git a/bootstrap/vagrant-onap/lib/appc b/bootstrap/vagrant-onap/lib/appc index 181c73f1f..14ba3cf96 100755 --- a/bootstrap/vagrant-onap/lib/appc +++ b/bootstrap/vagrant-onap/lib/appc @@ -6,20 +6,6 @@ source /var/onap/functions appc_src_folder=$git_src_folder/appc appc_repos=("appc" "appc/deployment") -# clone_all_appc_repos() - Function that clones APPC source repo. -function clone_all_appc_repos { - for repo in ${appc_repos[@]}; do - clone_repo $repo $appc_src_folder${repo#*appc} - done -} - -# compile_all_appc_repos() - Function that compiles APPC source repo. -function compile_all_appc_repos { - for repo in ${appc_repos[@]}; do - compile_src $appc_src_folder${repo#*appc} - done -} - # _build_appc_images() - Function that creates APPC images from source code. function _build_appc_images { get_sdnc_images @@ -47,9 +33,9 @@ function install_appc { # init_appc() - Function that initialize APPC services function init_appc { if [[ "$clone_repo" == "True" ]]; then - clone_all_appc_repos + clone_repos "appc" if [[ "$compile_repo" == "True" ]]; then - compile_all_appc_repos + compile_repos "appc" fi fi -- cgit 1.2.3-korg