Fix git checkout
If the branch does not exist locally, create it properly. Otherwise the script will abort with freshly checkout sources. Change-Id: I05960ed862fa61f3c9435f6749d941128812887b
This commit is contained in:
parent
0d91133bef
commit
9ec7a6f6c1
|
@ -154,7 +154,12 @@ if [ "$FAST" -eq 0 ] ; then
|
|||
|
||||
(
|
||||
cd $SOURCESDIR/$project
|
||||
git checkout $BRANCH
|
||||
GIT_CMD="git show-ref --verify --quiet refs/heads/$BRANCH"
|
||||
if $GIT_CMD; then
|
||||
git checkout $BRANCH
|
||||
else
|
||||
git checkout -b $BRANCH remotes/origin/$BRANCH
|
||||
fi
|
||||
python setup.py install
|
||||
)
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue