summaryrefslogtreecommitdiffstats
path: root/docker/prepare_env.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/prepare_env.sh')
-rwxr-xr-xdocker/prepare_env.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh
index 983eefc08..cae53b7c0 100755
--- a/docker/prepare_env.sh
+++ b/docker/prepare_env.sh
@@ -142,6 +142,20 @@ 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
+
fi
# We do this regardless if its online or offline mode.