diff options
Diffstat (limited to 'docker/prepare_env.sh')
-rwxr-xr-x | docker/prepare_env.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh index 983eefc08..321ae9fe3 100755 --- a/docker/prepare_env.sh +++ b/docker/prepare_env.sh @@ -142,6 +142,33 @@ if [ $offline == false ]; then info "BGPVPN repo: given commit is ${BGPVPN_COMMIT}. Reseting..." git reset --hard ${BGPVPN_COMMIT} fi + + info "Updating ONOS repository...." + cd ${ONOS_REPO_DIR} + if [ ${ONOS_BRANCH} != "master" ]; then + info "ONOS repo: checkout ${ONOS} branch..." + git checkout ${ONOS_BRANCH} + fi + info "ONOS repo: pulling to latest..." + git pull + if [ ${ONOS_COMMIT} != "latest" ]; then + info "ONOS repo: given commit is ${ONOS_COMMIT}. Reseting..." + git reset --hard ${ONOS_COMMIT} + fi + + info "Updating PROMISE repository...." + cd ${PROMISE_REPO_DIR} + if [ ${PROMISE_BRANCH} != "master" ]; then + info "PROMISE repo: checkout ${PROMISE} branch..." + git checkout ${PROMISE_BRANCH} + fi + info "PROMISE repo: pulling to latest..." + git pull + if [ ${PROMISE_COMMIT} != "latest" ]; then + info "PROMISE repo: given commit is ${PROMISE_COMMIT}. Reseting..." + git reset --hard ${PROMISE_COMMIT} + fi + fi # We do this regardless if its online or offline mode. |