diff --git a/scripts/upgrade b/scripts/upgrade index f02b22b..1f0dbe1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -111,7 +111,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then # If current install is not a Git repo then init one git init --quiet - git remote add origin $repo_url + if ! git config remote.origin.url > /dev/null; then + # If remote does not exist, add it + git remote add origin $repo_url + fi git fetch origin --quiet git checkout -b stable --track origin/stable --force --quiet fi @@ -125,7 +128,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then # If current install is not a Git repo then init one git init --quiet - git remote add origin $addons_repo_url + if ! git config remote.origin.url > /dev/null; then + # If remote does not exist, add it + git remote add origin $addons_repo_url + fi git fetch origin --quiet git checkout -b stable --track origin/stable --force --quiet fi