Skip to content
Snippets Groups Projects
Commit b8d570b0 authored by Viktor Vorobev's avatar Viktor Vorobev
Browse files

Merged in NRRPLT-8865 (pull request #100)

[NRRPLT-8865] add parameter to clone_all_repos to determine the branch for clonning

* [NRRPLT-8865] add parameter to clone_all_repos to determine the branch for clonning
parent ab8bcd78
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# A script to clone all necessary repos when installing from scratch. the $HBP need to be set-up for this script to work successfully # A script to clone all necessary repos when installing from scratch. the $HBP need to be set-up for this script to work successfully
install_dir="$HBP" install_dir="$HBP"
NRP_BRANCH="${NRP_DEFAULT_BRANCH:-master}"
if [[ -z "$install_dir" ]]; then if [[ -z "$install_dir" ]]; then
echo "Please set the \$HBP variable to your desired installation path first." echo "Please set the \$HBP variable to your desired installation path first."
...@@ -35,7 +36,7 @@ function clone_repo() { ...@@ -35,7 +36,7 @@ function clone_repo() {
echo "Skipped, directory already exists." echo "Skipped, directory already exists."
else else
if [ "$NRP_INSTALL_MODE" == "user" ]; then if [ "$NRP_INSTALL_MODE" == "user" ]; then
git clone -b master --depth 1 https://bitbucket.org/hbpneurorobotics/$1.git $1 git clone -b "${NRP_BRANCH}" --depth 1 https://bitbucket.org/hbpneurorobotics/$1.git $1
else else
git clone $user@bitbucket.org:hbpneurorobotics/$1.git $1 git clone $user@bitbucket.org:hbpneurorobotics/$1.git $1
fi fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment