diff --git a/cook.sh b/cook.sh index ae5bc997bc4ba37e24a504cf7a3b7fb0e8011782..daf79c7583e7308de65087540e34ace8bfbcee7f 100755 --- a/cook.sh +++ b/cook.sh @@ -87,8 +87,16 @@ function op { fi pushd source > /dev/null + git remote set-url origin "$GIT" + git fetch origin + if [ -n "$GIT_UPSTREAM" ] + then + git remote set-url upstream "$GIT_UPSTREAM" &> /dev/null || + git remote add upstream "$GIT_UPSTREAM" + git fetch upstream + fi git pull - git submodule sync + git submodule sync --recursive git submodule update --init --recursive popd > /dev/null fi