From 1f7128c43f30116d48dcceff630b5ac6728c272c Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Wed, 11 Oct 2017 19:57:27 -0600 Subject: [PATCH] Add upstream link if necessary --- cook.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cook.sh b/cook.sh index ae5bc997b..daf79c758 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 -- GitLab