+ INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
+ git clone $OSM_GIT_URL/$OSM_MDG
+ cd $OSM_MDG
+ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
+fi
+
+if [ $# -gt 0 ]; then
+ if [ "$1" = "checkout" ]; then
+ INFO "Code to compile: '$2'"
+ git checkout $2
+ else
+ INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
+ git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
+ git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
+ fi
+else
+ INFO "Code to compile: master"
+ git checkout master